@@ -1149,7 +1149,7 @@ class Table(object):
1149
1149
def __init__ (self , parent , group , ** kwargs ):
1150
1150
self .parent = parent
1151
1151
self .group = group
1152
- self .version = getattr (group ._v_attrs ,'version ' ,None )
1152
+ self .version = getattr (group ._v_attrs ,'pandas_version ' ,None )
1153
1153
self .index_axes = []
1154
1154
self .non_index_axes = []
1155
1155
self .values_axes = []
@@ -1257,6 +1257,12 @@ def set_attrs(self):
1257
1257
self .attrs .values_cols = self .values_cols ()
1258
1258
self .attrs .non_index_axes = self .non_index_axes
1259
1259
1260
+ def validate_version (self , where = None ):
1261
+ """ are we trying to operate on an old version? """
1262
+ if where is not None :
1263
+ if self .version is None or float (self .version ) < 0.1 :
1264
+ warnings .warn ("where criteria is being ignored as we this version is too old (or not-defined) [%s]" % self .version , IncompatibilityWarning )
1265
+
1260
1266
def validate (self ):
1261
1267
""" raise if we have an incompitable table type with the current """
1262
1268
et = getattr (self .attrs ,'table_type' ,None )
@@ -1325,6 +1331,9 @@ def create_index(self, columns = None, optlevel = None, kind = None):
1325
1331
def read_axes (self , where ):
1326
1332
""" create and return the axes sniffed from the table: return boolean for success """
1327
1333
1334
+ # validate the version
1335
+ self .validate_version (where )
1336
+
1328
1337
# infer the data kind
1329
1338
if not self .infer_axes (): return False
1330
1339
@@ -1523,11 +1532,6 @@ def read(self, where=None):
1523
1532
_dm = create_debug_memory (self .parent )
1524
1533
_dm ('start' )
1525
1534
1526
- # are we trying to operate on an old version?
1527
- if where is not None :
1528
- if self .version is None or self .version < 0.1 :
1529
- warnings .warn ("where criteria is being ignored as we this version is too old (or not-defined) [%s]" % self .version , IncompatibilityWarning )
1530
-
1531
1535
if not self .read_axes (where ): return None
1532
1536
1533
1537
_dm ('read_axes' )
0 commit comments