@@ -1651,11 +1651,6 @@ Closing a Store, Context Manager
1651
1651
import os
1652
1652
os.remove(' store.h5' )
1653
1653
1654
-
1655
- These stores are ** not ** appendable once written (though you can simply
1656
- remove them and rewrite). Nor are they ** queryable** ; they must be
1657
- retrieved in their entirety.
1658
-
1659
1654
Read/ Write API
1660
1655
~~~~~~~~~~~~~~
1661
1656
@@ -1674,10 +1669,33 @@ similar to how ``read_csv`` and ``to_csv`` work. (new in 0.11.0)
1674
1669
1675
1670
os.remove(' store_tl.h5' )
1676
1671
1672
+ .. _io.hdf5- storer:
1673
+
1674
+ Storer Format
1675
+ ~~~~~~~~~~~~~
1676
+
1677
+ The examples above show storing using `` put`` , which write the HDF5 to `` PyTables`` in a fixed array format , called
1678
+ the `` storer`` format . These types of stores are are ** not ** appendable once written (though you can simply
1679
+ remove them and rewrite). Nor are they ** queryable** ; they must be
1680
+ retrieved in their entirety. These offer very fast writing and slightly faster reading than `` table`` stores.
1681
+
1682
+ .. warning::
1683
+
1684
+ A `` storer`` format will raise a `` TypeError `` if you try to retrieve using a `` where`` .
1685
+
1686
+ .. code- block:: python
1687
+
1688
+ DataFrame(randn(10 ,2 )).to_hdf(' test_storer.h5' ,' df' )
1689
+
1690
+ pd.read_hdf(' test_storer.h5' ,' df' ,where = ' index>5' )
1691
+ TypeError : cannot pass a where specification when reading a non- table
1692
+ this store must be selected in its entirety
1693
+
1694
+
1677
1695
.. _io.hdf5- table:
1678
1696
1679
- Storing in Table format
1680
- ~~~~~~~~~~~~~~~~~~~~~~~
1697
+ Table Format
1698
+ ~~~~~~~~~~~~
1681
1699
1682
1700
`` HDFStore`` supports another `` PyTables`` format on disk, the `` table``
1683
1701
format . Conceptually a `` table`` is shaped very much like a DataFrame,
@@ -1708,6 +1726,10 @@ supported.
1708
1726
# the type of stored data
1709
1727
store.root.df._v_attrs.pandas_type
1710
1728
1729
+ .. note::
1730
+
1731
+ You can also create a `` table`` by passing `` table = True `` to a `` put`` operation.
1732
+
1711
1733
.. _io.hdf5- keys:
1712
1734
1713
1735
Hierarchical Keys
@@ -2121,9 +2143,6 @@ Notes & Caveats
2121
2143
in a string, or a `` NaT`` in a datetime- like column counts as having
2122
2144
a value), then those rows ** WILL BE DROPPED IMPLICITLY ** . This limitation
2123
2145
* may* be addressed in the future.
2124
- - You can not append/ select/ delete to a non- table (table creation is
2125
- determined on the first append, or by passing `` table = True `` in a
2126
- put operation)
2127
2146
- `` HDFStore`` is ** not - threadsafe for writing** . The underlying
2128
2147
`` PyTables`` only supports concurrent reads (via threading or
2129
2148
processes). If you need reading and writing * at the same time* , you
0 commit comments