Skip to content

Commit 71d5151

Browse files
committed
DOC: doc updates for external compatibility
1 parent e3ae189 commit 71d5151

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

doc/source/io.rst

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,7 @@ To retrieve the *unique* values of an indexable or data column, use the method `
12601260
12611261
concat([ store.select('df_dc',c) for c in [ crit1, crit2 ] ])
12621262
1263-
**Table Object**
1263+
**Storer Object**
12641264

12651265
If you want to inspect the stored object, retrieve via ``get_storer``. You could use this progamatically to say get the number of rows in an object.
12661266

@@ -1363,8 +1363,26 @@ Notes & Caveats
13631363
# we have provided a minimum minor_axis indexable size
13641364
store.root.wp_big_strings.table
13651365

1366-
Compatibility
1367-
~~~~~~~~~~~~~
1366+
External Compatibility
1367+
~~~~~~~~~~~~~~~~~~~~~~
1368+
1369+
``HDFStore`` write storer objects in specific formats suitable for producing loss-less roundtrips to pandas objects. For external compatibility, ``HDFStore`` can read native ``PyTables`` format tables. It is possible to write an ``HDFStore`` object that can easily be imported into ``R`` using the ``rhdf5`` library. Create a table format store like this:
1370+
1371+
.. ipython:: python
1372+
1373+
store_export = HDFStore('export.h5')
1374+
store_export.append('df_dc',df_dc,data_columns=df_dc.columns)
1375+
store_export
1376+
1377+
.. ipython:: python
1378+
:suppress:
1379+
1380+
legacy_store.close()
1381+
import os
1382+
os.remove('store_export.h5')
1383+
1384+
Backwards Compatibility
1385+
~~~~~~~~~~~~~~~~~~~~~~~
13681386

13691387
0.10.1 of ``HDFStore`` is backwards compatible for reading tables created in a prior version of pandas however, query terms using the prior (undocumented) methodology are unsupported. ``HDFStore`` will issue a warning if you try to use a prior-version format file. You must read in the entire file and write it out using the new format, using the method ``copy`` to take advantage of the updates. The group attribute ``pandas_version`` contains the version information. ``copy`` takes a number of options, please see the docstring.
13701388

doc/source/v0.10.1.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ Multi-table creation via ``append_to_multiple`` and selection via ``select_as_mu
119119

120120
**Enhancements**
121121

122+
- ``HDFStore`` now can read native PyTables table format tables
122123
- You can pass ``nan_rep = 'my_nan_rep'`` to append, to change the default nan representation on disk (which converts to/from `np.nan`), this defaults to `nan`.
123124
- You can pass ``index`` to ``append``. This defaults to ``True``. This will automagically create indicies on the *indexables* and *data columns* of the table
124125
- You can pass ``chunksize=an integer`` to ``append``, to change the writing chunksize (default is 50000). This will signficantly lower your memory usage on writing.

0 commit comments

Comments
 (0)