Skip to content

Commit 49a21db

Browse files
committed
Merge pull request #4645 from jreback/hdf_api
API: remove the table keyword, replaced by fmt='s|t'
2 parents 516f802 + 952a342 commit 49a21db

File tree

5 files changed

+612
-308
lines changed

5 files changed

+612
-308
lines changed

doc/source/io.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -1803,6 +1803,7 @@ The examples above show storing using ``put``, which write the HDF5 to ``PyTable
18031803
the ``storer`` format. These types of stores are are **not** appendable once written (though you can simply
18041804
remove them and rewrite). Nor are they **queryable**; they must be
18051805
retrieved in their entirety. These offer very fast writing and slightly faster reading than ``table`` stores.
1806+
This format is specified by default when using ``put`` or by ``fmt='s'``
18061807
18071808
.. warning::
18081809
@@ -1826,7 +1827,7 @@ Table Format
18261827
format. Conceptually a ``table`` is shaped very much like a DataFrame,
18271828
with rows and columns. A ``table`` may be appended to in the same or
18281829
other sessions. In addition, delete & query type operations are
1829-
supported.
1830+
supported. This format is specified by ``fmt='t'`` to ``append`` or ``put``.
18301831
18311832
.. ipython:: python
18321833
:suppress:
@@ -1853,7 +1854,7 @@ supported.
18531854
18541855
.. note::
18551856
1856-
You can also create a ``table`` by passing ``table=True`` to a ``put`` operation.
1857+
You can also create a ``table`` by passing ``fmt='t'`` to a ``put`` operation.
18571858
18581859
.. _io.hdf5-keys:
18591860

doc/source/release.rst

+2
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ pandas 0.13
100100
- removed the ``warn`` argument from ``open``. Instead a ``PossibleDataLossError`` exception will
101101
be raised if you try to use ``mode='w'`` with an OPEN file handle (:issue:`4367`)
102102
- allow a passed locations array or mask as a ``where`` condition (:issue:`4467`)
103+
- the ``fmt`` keyword now replaces the ``table`` keyword; allowed values are ``s|t``
103104
- ``JSON``
104105

105106
- added ``date_unit`` parameter to specify resolution of timestamps. Options
@@ -203,6 +204,7 @@ See :ref:`Internal Refactoring<whatsnew_0130.refactoring>`
203204
with a different block ordering (:issue:`4096`)
204205
- ``read_hdf`` was not respecting as passed ``mode`` (:issue:`4504`)
205206
- appending a 0-len table will work correctly (:issue:`4273`)
207+
- ``to_hdf`` was raising when passing both arguments ``append`` and ``table`` (:issue:`4584`)
206208
- Fixed bug in tslib.tz_convert(vals, tz1, tz2): it could raise IndexError exception while
207209
trying to access trans[pos + 1] (:issue:`4496`)
208210
- The ``by`` argument now works correctly with the ``layout`` argument

doc/source/v0.13.0.txt

+20
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,33 @@ API changes
6666
store2.close()
6767
store2
6868

69+
.. ipython:: python
70+
:suppress:
71+
72+
import os
73+
os.remove(path)
74+
6975
- removed the ``_quiet`` attribute, replace by a ``DuplicateWarning`` if retrieving
7076
duplicate rows from a table (:issue:`4367`)
7177
- removed the ``warn`` argument from ``open``. Instead a ``PossibleDataLossError`` exception will
7278
be raised if you try to use ``mode='w'`` with an OPEN file handle (:issue:`4367`)
7379
- allow a passed locations array or mask as a ``where`` condition (:issue:`4467`).
7480
See :ref:`here<io.hdf5-where_mask>` for an example.
7581

82+
- the ``fmt`` keyword now replaces the ``table`` keyword; allowed values are ``s|t``
83+
the same defaults as prior < 0.13.0 remain, e.g. ``put`` implies 's' (Storer) format
84+
and ``append`` imples 't' (Table) format
85+
86+
.. ipython:: python
87+
88+
path = 'test.h5'
89+
df = DataFrame(randn(10,2))
90+
df.to_hdf(path,'df_table',fmt='t')
91+
df.to_hdf(path,'df_table2',append=True)
92+
df.to_hdf(path,'df_storer')
93+
with get_store(path) as store:
94+
print store
95+
7696
.. ipython:: python
7797
:suppress:
7898

0 commit comments

Comments
 (0)