@@ -1118,11 +1118,11 @@ everying in the sub-store and BELOW, so be *careful*.
1118
1118
Storing Mixed Types in a Table
1119
1119
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1120
1120
1121
- Storing mixed-dtype data is supported. Strings are store as a
1121
+ Storing mixed-dtype data is supported. Strings are stored as a
1122
1122
fixed-width using the maximum size of the appended column. Subsequent
1123
1123
appends will truncate strings at this length.
1124
1124
1125
- Passing ``min_itemsize = { `values` : size } `` as a parameter to append
1125
+ Passing ``min_itemsize={ `values`: size} `` as a parameter to append
1126
1126
will set a larger minimum for the string columns. Storing ``floats,
1127
1127
strings, ints, bools, datetime64 `` are currently supported. For string
1128
1128
columns, passing ``nan_rep = 'nan' `` to append will change the default
@@ -1136,7 +1136,7 @@ defaults to `nan`.
1136
1136
df_mixed[' int' ] = 1
1137
1137
df_mixed[' bool' ] = True
1138
1138
df_mixed[' datetime64' ] = Timestamp(' 20010102' )
1139
- df_mixed.ix[3 :5 ,[' A' ,' B' ,' string' ,' datetime64' ]] = np.nan
1139
+ df_mixed.ix[3 :5 ,[' A' , ' B' , ' string' , ' datetime64' ]] = np.nan
1140
1140
1141
1141
store.append(' df_mixed' , df_mixed, min_itemsize = {' values' : 50 })
1142
1142
df_mixed1 = store.select(' df_mixed' )
@@ -1150,7 +1150,7 @@ Storing Multi-Index DataFrames
1150
1150
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1151
1151
1152
1152
Storing multi-index dataframes as tables is very similar to
1153
- storing/selecting from homogenous index DataFrames.
1153
+ storing/selecting from homogeneous index DataFrames.
1154
1154
1155
1155
.. ipython :: python
1156
1156
@@ -1173,7 +1173,7 @@ storing/selecting from homogenous index DataFrames.
1173
1173
Querying a Table
1174
1174
~~~~~~~~~~~~~~~~
1175
1175
1176
- ``select `` and ``delete `` operations have an optional criteria that can
1176
+ ``select `` and ``delete `` operations have an optional criterion that can
1177
1177
be specified to select/delete only a subset of the data. This allows one
1178
1178
to have a very large on-disk table and retrieve only a portion of the
1179
1179
data.
@@ -1201,7 +1201,7 @@ terms.
1201
1201
Queries are built up using a list of ``Terms `` (currently only
1202
1202
**anding ** of terms is supported). An example query for a panel might be
1203
1203
specified as follows. ``['major_axis>20000102', ('minor_axis', '=',
1204
- ['A','B']) ] ``. This is roughly translated to: `major_axis must be
1204
+ ['A', 'B']) ] ``. This is roughly translated to: `major_axis must be
1205
1205
greater than the date 20000102 and the minor_axis must be A or B `
1206
1206
1207
1207
.. ipython :: python
@@ -1212,13 +1212,13 @@ greater than the date 20000102 and the minor_axis must be A or B`
1212
1212
1213
1213
The ``columns `` keyword can be supplied to select to filter a list of
1214
1214
the return columns, this is equivalent to passing a
1215
- ``Term('columns',list_of_columns_to_filter) ``
1215
+ ``Term('columns', list_of_columns_to_filter) ``
1216
1216
1217
1217
.. ipython :: python
1218
1218
1219
1219
store.select(' df' , columns = [' A' , ' B' ])
1220
1220
1221
- Start and Stop parameters can be specified to limit the total search
1221
+ `` start `` and `` stop `` parameters can be specified to limit the total search
1222
1222
space. These are in terms of the total number of rows in a table.
1223
1223
1224
1224
.. ipython :: python
@@ -1251,7 +1251,7 @@ specify. This behavior can be turned off by passing ``index=False`` to
1251
1251
i.optlevel, i.kind
1252
1252
1253
1253
# change an index by passing new parameters
1254
- store.create_table_index(' df' , optlevel = 9 , kind = ' full' )
1254
+ store.create_table_index(' df' , optlevel = 9 , kind = ' full' )
1255
1255
i = store.root.df.table.cols.index.index
1256
1256
i.optlevel, i.kind
1257
1257
@@ -1312,7 +1312,7 @@ very quickly. Note ``nan`` are excluded from the result set.
1312
1312
**Replicating or **
1313
1313
1314
1314
``not `` and ``or `` conditions are unsupported at this time; however,
1315
- ``or `` operations are easy to replicate, by repeately applying the
1315
+ ``or `` operations are easy to replicate, by repeatedly applying the
1316
1316
criteria to the table, and then ``concat `` the results.
1317
1317
1318
1318
.. ipython :: python
@@ -1325,7 +1325,7 @@ criteria to the table, and then ``concat`` the results.
1325
1325
**Storer Object **
1326
1326
1327
1327
If you want to inspect the stored object, retrieve via
1328
- ``get_storer ``. You could use this progamatically to say get the number
1328
+ ``get_storer ``. You could use this programmatically to say get the number
1329
1329
of rows in an object.
1330
1330
1331
1331
.. ipython :: python
@@ -1340,10 +1340,10 @@ New in 0.10.1 are the methods ``append_to_multple`` and
1340
1340
``select_as_multiple ``, that can perform appending/selecting from
1341
1341
multiple tables at once. The idea is to have one table (call it the
1342
1342
selector table) that you index most/all of the columns, and perform your
1343
- queries. The other table(s) are data tables that are indexed the same
1343
+ queries. The other table(s) are data tables that are indexed the same as
1344
1344
the selector table. You can then perform a very fast query on the
1345
1345
selector table, yet get lots of data back. This method works similar to
1346
- having a very wide- table, but is more efficient in terms of queries.
1346
+ having a very wide table, but is more efficient in terms of queries.
1347
1347
1348
1348
Note, **THE USER IS RESPONSIBLE FOR SYNCHRONIZING THE TABLES **. This
1349
1349
means, append to the tables in the same order; ``append_to_multiple ``
@@ -1369,7 +1369,7 @@ table (optional) to let it have the remaining columns. The argument
1369
1369
store.select(' df2_mt' )
1370
1370
1371
1371
# as a multiple
1372
- store.select_as_multiple([' df1_mt' ,' df2_mt' ], where = [' A>0' , ' B>0' ],
1372
+ store.select_as_multiple([' df1_mt' , ' df2_mt' ], where = [' A>0' , ' B>0' ],
1373
1373
selector = ' df1_mt' )
1374
1374
1375
1375
@@ -1386,7 +1386,7 @@ pays to have the dimension you are deleting be the first of the
1386
1386
``indexables ``.
1387
1387
1388
1388
Data is ordered (on the disk) in terms of the ``indexables ``. Here's a
1389
- simple use case. You store panel type data, with dates in the
1389
+ simple use case. You store panel- type data, with dates in the
1390
1390
``major_axis `` and ids in the ``minor_axis ``. The data is then
1391
1391
interleaved like this:
1392
1392
0 commit comments