You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/io.rst
+25-12Lines changed: 25 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1106,7 +1106,7 @@ Storing Mixed Types in a Table
1106
1106
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1107
1107
1108
1108
Storing mixed-dtype data is supported. Strings are store as a fixed-width using the maximum size of the appended column. Subsequent appends will truncate strings at this length.
1109
-
Passing ``min_itemsize = { `values` : size }`` as a parameter to append will set a larger minimum for the string columns. Storing ``floats, strings, ints, bools, datetime64`` are currently supported. For string columns, passing ``nan_rep = 'my_nan_rep'`` to append will change the default nan representation on disk (which converts to/from `np.nan`), this defaults to `nan`.
1109
+
Passing ``min_itemsize = { `values` : size }`` as a parameter to append will set a larger minimum for the string columns. Storing ``floats, strings, ints, bools, datetime64`` are currently supported. For string columns, passing ``nan_rep = 'nan'`` to append will change the default nan representation on disk (which converts to/from `np.nan`), this defaults to `nan`.
1110
1110
1111
1111
.. ipython:: python
1112
1112
@@ -1115,9 +1115,6 @@ Passing ``min_itemsize = { `values` : size }`` as a parameter to append will set
@@ -1128,8 +1125,6 @@ Passing ``min_itemsize = { `values` : size }`` as a parameter to append will set
1128
1125
# we have provided a minimum string column size
1129
1126
store.root.df_mixed.table
1130
1127
1131
-
It is ok to store ``np.nan`` in a ``float or string``. Make sure to do a ``convert_objects()`` on the frame before storing a ``np.nan`` in a datetime64 column. Storing a column with a ``np.nan`` in a ``int, bool`` will currently throw an ``Exception`` as these columns will have converted to ``object`` type.
1132
-
1133
1128
Storing Multi-Index DataFrames
1134
1129
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1135
1130
@@ -1268,11 +1263,11 @@ To retrieve the *unique* values of an indexable or data column, use the method `
1268
1263
1269
1264
**Table Object**
1270
1265
1271
-
If you want to inspect the table object, retrieve via ``get_table``. You could use this progamatically to say get the number of rows in the table.
1266
+
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.
1272
1267
1273
1268
.. ipython:: python
1274
1269
1275
-
store.get_table('df_dc').nrows
1270
+
store.get_storer('df_dc').nrows
1276
1271
1277
1272
Multiple Table Queries
1278
1273
~~~~~~~~~~~~~~~~~~~~~~
@@ -1348,7 +1343,7 @@ Or on-the-fly compression (this only applies to tables). You can turn off file c
Furthermore ``ptrepack in.h5 out.h5`` will *repack* the file to allow you to reuse previously deleted space (alternatively, one can simply remove the file and write again).
1346
+
Furthermore ``ptrepack in.h5 out.h5`` will *repack* the file to allow you to reuse previously deleted space. Aalternatively, one can simply remove the file and write again, or use the ``copy`` method.
1352
1347
1353
1348
Notes & Caveats
1354
1349
~~~~~~~~~~~~~~~
@@ -1372,10 +1367,28 @@ Notes & Caveats
1372
1367
Compatibility
1373
1368
~~~~~~~~~~~~~
1374
1369
1375
-
0.10 of ``HDFStore`` is backwards compatible for reading tables created in a prior version of pandas,
1376
-
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
1377
-
file and write it out using the new format to take advantage of the updates. The group attribute ``pandas_version`` contains the version information.
1370
+
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.
0 commit comments