29
29
from pandas .tools .merge import concat
30
30
31
31
import pandas .lib as lib
32
+ import pandas .algos as algos
33
+ import pandas .tslib as tslib
34
+
32
35
from contextlib import contextmanager
33
36
34
37
# reading and writing the full object in one go
@@ -609,9 +612,9 @@ def _write_index(self, group, key, index):
609
612
node ._v_attrs .freq = index .freq
610
613
611
614
if hasattr (index , 'tz' ) and index .tz is not None :
612
- zone = lib .get_timezone (index .tz )
615
+ zone = tslib .get_timezone (index .tz )
613
616
if zone is None :
614
- zone = lib .tot_seconds (index .tz .utcoffset ())
617
+ zone = tslib .tot_seconds (index .tz .utcoffset ())
615
618
node ._v_attrs .tz = zone
616
619
617
620
def _read_index (self , group , key ):
@@ -1276,26 +1279,27 @@ def delete(self, where = None, **kwargs):
1276
1279
raise NotImplementedError ("cannot delete on an abstract table" )
1277
1280
1278
1281
class WORMTable (Table ):
1279
- """ a write-once read-many table:
1280
- this format DOES NOT ALLOW appending to a table. writing is a one-time operation
1281
- the data are stored in a format that allows for searching the data on disk
1282
+ """ a write-once read-many table: this format DOES NOT ALLOW appending to a
1283
+ table. writing is a one-time operation the data are stored in a format
1284
+ that allows for searching the data on disk
1282
1285
"""
1283
1286
table_type = 'worm'
1284
1287
1285
1288
def read (self , ** kwargs ):
1286
- """ read the indicies and the indexing array, calculate offset rows and return """
1289
+ """ read the indicies and the indexing array, calculate offset rows and
1290
+ return """
1287
1291
raise NotImplementedError ("WORMTable needs to implement read" )
1288
1292
1289
1293
def write (self , ** kwargs ):
1290
- """ write in a format that we can search later on (but cannot append to):
1291
- write out the indicies and the values using _write_array (e.g. a CArray)
1292
- create an indexing table so that we can search """
1294
+ """ write in a format that we can search later on (but cannot append
1295
+ to): write out the indicies and the values using _write_array
1296
+ (e.g. a CArray) create an indexing table so that we can search"""
1293
1297
raise NotImplementedError ("WORKTable needs to implement write" )
1294
1298
1295
1299
class LegacyTable (Table ):
1296
- """ an appendable table:
1297
- allow append/query/delete operations to a (possibily) already existing appendable table
1298
- this table ALLOWS append (but doesn't require them), and stores the data in a format
1300
+ """ an appendable table: allow append/query/delete operations to a
1301
+ (possibily) already existing appendable table this table ALLOWS
1302
+ append (but doesn't require them), and stores the data in a format
1299
1303
that can be easily searched
1300
1304
1301
1305
"""
@@ -1318,7 +1322,7 @@ def read(self, where=None):
1318
1322
1319
1323
panels = []
1320
1324
if len (unique (key )) == len (key ):
1321
- sorter , _ = lib .groupsort_indexer (com ._ensure_int64 (key ), J * K )
1325
+ sorter , _ = algos .groupsort_indexer (com ._ensure_int64 (key ), J * K )
1322
1326
sorter = com ._ensure_platform_int (sorter )
1323
1327
1324
1328
# create the panels
0 commit comments