Skip to content

Commit

Permalink
Merge pull request #4645 from jreback/hdf_api
Browse files Browse the repository at this point in the history
API: remove the table keyword, replaced by fmt='s|t'
  • Loading branch information
jreback committed Aug 26, 2013
2 parents 516f802 + 952a342 commit 49a21db
Show file tree
Hide file tree
Showing 5 changed files with 612 additions and 308 deletions.
5 changes: 3 additions & 2 deletions doc/source/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1803,6 +1803,7 @@ The examples above show storing using ``put``, which write the HDF5 to ``PyTable
the ``storer`` format. These types of stores are are **not** appendable once written (though you can simply
remove them and rewrite). Nor are they **queryable**; they must be
retrieved in their entirety. These offer very fast writing and slightly faster reading than ``table`` stores.
This format is specified by default when using ``put`` or by ``fmt='s'``
.. warning::
Expand All @@ -1826,7 +1827,7 @@ Table Format
format. Conceptually a ``table`` is shaped very much like a DataFrame,
with rows and columns. A ``table`` may be appended to in the same or
other sessions. In addition, delete & query type operations are
supported.
supported. This format is specified by ``fmt='t'`` to ``append`` or ``put``.
.. ipython:: python
:suppress:
Expand All @@ -1853,7 +1854,7 @@ supported.
.. note::
You can also create a ``table`` by passing ``table=True`` to a ``put`` operation.
You can also create a ``table`` by passing ``fmt='t'`` to a ``put`` operation.
.. _io.hdf5-keys:
Expand Down
2 changes: 2 additions & 0 deletions doc/source/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ pandas 0.13
- removed the ``warn`` argument from ``open``. Instead a ``PossibleDataLossError`` exception will
be raised if you try to use ``mode='w'`` with an OPEN file handle (:issue:`4367`)
- allow a passed locations array or mask as a ``where`` condition (:issue:`4467`)
- the ``fmt`` keyword now replaces the ``table`` keyword; allowed values are ``s|t``
- ``JSON``

- added ``date_unit`` parameter to specify resolution of timestamps. Options
Expand Down Expand Up @@ -203,6 +204,7 @@ See :ref:`Internal Refactoring<whatsnew_0130.refactoring>`
with a different block ordering (:issue:`4096`)
- ``read_hdf`` was not respecting as passed ``mode`` (:issue:`4504`)
- appending a 0-len table will work correctly (:issue:`4273`)
- ``to_hdf`` was raising when passing both arguments ``append`` and ``table`` (:issue:`4584`)
- Fixed bug in tslib.tz_convert(vals, tz1, tz2): it could raise IndexError exception while
trying to access trans[pos + 1] (:issue:`4496`)
- The ``by`` argument now works correctly with the ``layout`` argument
Expand Down
20 changes: 20 additions & 0 deletions doc/source/v0.13.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,33 @@ API changes
store2.close()
store2

.. ipython:: python
:suppress:

import os
os.remove(path)

- removed the ``_quiet`` attribute, replace by a ``DuplicateWarning`` if retrieving
duplicate rows from a table (:issue:`4367`)
- removed the ``warn`` argument from ``open``. Instead a ``PossibleDataLossError`` exception will
be raised if you try to use ``mode='w'`` with an OPEN file handle (:issue:`4367`)
- allow a passed locations array or mask as a ``where`` condition (:issue:`4467`).
See :ref:`here<io.hdf5-where_mask>` for an example.

- the ``fmt`` keyword now replaces the ``table`` keyword; allowed values are ``s|t``
the same defaults as prior < 0.13.0 remain, e.g. ``put`` implies 's' (Storer) format
and ``append`` imples 't' (Table) format

.. ipython:: python

path = 'test.h5'
df = DataFrame(randn(10,2))
df.to_hdf(path,'df_table',fmt='t')
df.to_hdf(path,'df_table2',append=True)
df.to_hdf(path,'df_storer')
with get_store(path) as store:
print store

.. ipython:: python
:suppress:

Expand Down
Loading

0 comments on commit 49a21db

Please sign in to comment.