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-2Lines changed: 25 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1095,7 +1095,7 @@ Storing Mixed Types in a Table
1095
1095
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1096
1096
1097
1097
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.
1098
-
Passing ``min_itemsize = { `values` : size }`` as a parameter to append will set a larger minimum for the string columns. Storing ``floats, strings, ints, bools`` are currently supported.
1098
+
Passing ``min_itemsize = { `values` : size }`` as a parameter to append will set a larger minimum for the string columns. Storing ``floats, strings, ints, bools`` 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`.
1099
1099
1100
1100
.. ipython:: python
1101
1101
@@ -1115,7 +1115,6 @@ Passing ``min_itemsize = { `values` : size }`` as a parameter to append will set
1115
1115
1116
1116
Querying a Table
1117
1117
~~~~~~~~~~~~~~~~
1118
-
1119
1118
``select`` and ``delete`` operations have an optional criteria that can be specified to select/delete only
1120
1119
a subset of the data. This allows one to have a very large on-disk table and retrieve only a portion of the data.
1121
1120
@@ -1160,6 +1159,30 @@ You can create an index for a table with ``create_table_index`` after data is al
1160
1159
i.optlevel, i.kind
1161
1160
1162
1161
1162
+
Query via Data Columns
1163
+
~~~~~~~~~~~~~~~~~~~~~~
1164
+
You can designate (and index) certain columns that you want to be able to perform queries (other than the `indexable` columns, which you can always query). For instance say you want to perform this this common operation, on-disk, and return just the frame that matches this query.
There is some performance degredation by making lots of columns into `data columns`, so it is up to the user to designate these.
1185
+
1163
1186
Delete from a Table
1164
1187
~~~~~~~~~~~~~~~~~~~
1165
1188
You can delete from a table selectively by specifying a ``where``. In deleting rows, it is important to understand the ``PyTables`` deletes rows by erasing the rows, then **moving** the following data. Thus deleting can potentially be a very expensive operation depending on the orientation of your data. This is especially true in higher dimensional objects (``Panel`` and ``Panel4D``). To get optimal deletion speed, it pays to have the dimension you are deleting be the first of the ``indexables``.
0 commit comments