@@ -1207,13 +1207,20 @@ def set_atom(self, block, existing_col, min_itemsize, nan_rep, **kwargs):
1207
1207
1208
1208
self .values = list (block .items )
1209
1209
dtype = block .dtype .name
1210
- inferred_type = lib .infer_dtype (block .values .ravel ())
1210
+ rvalues = block .values .ravel ()
1211
+ inferred_type = lib .infer_dtype (rvalues )
1211
1212
1212
1213
if inferred_type == 'datetime64' :
1213
1214
self .set_atom_datetime64 (block )
1214
1215
elif inferred_type == 'date' :
1215
1216
raise TypeError (
1216
1217
"[date] is not implemented as a table column" )
1218
+ elif inferred_type == 'datetime' :
1219
+ if getattr (rvalues [0 ],'tzinfo' ,None ) is not None :
1220
+ raise TypeError (
1221
+ "timezone support on datetimes is not yet implemented as a table column" )
1222
+ raise TypeError (
1223
+ "[datetime] is not implemented as a table column" )
1217
1224
elif inferred_type == 'unicode' :
1218
1225
raise TypeError (
1219
1226
"[unicode] is not implemented as a table column" )
@@ -2080,8 +2087,18 @@ def validate(self, other):
2080
2087
(other .table_type , self .table_type ))
2081
2088
2082
2089
for c in ['index_axes' ,'non_index_axes' ,'values_axes' ]:
2083
- if getattr (self ,c ,None ) != getattr (other ,c ,None ):
2084
- raise ValueError ("invalid combinate of [%s] on appending data [%s] vs current table [%s]" % (c ,getattr (self ,c ,None ),getattr (other ,c ,None )))
2090
+ sv = getattr (self ,c ,None )
2091
+ ov = getattr (other ,c ,None )
2092
+ if sv != ov :
2093
+
2094
+ # show the error for the specific axes
2095
+ for i , sax in enumerate (sv ):
2096
+ oax = ov [i ]
2097
+ if sax != oax :
2098
+ raise ValueError ("invalid combinate of [%s] on appending data [%s] vs current table [%s]" % (c ,sax ,oax ))
2099
+
2100
+ # should never get here
2101
+ raise Exception ("invalid combinate of [%s] on appending data [%s] vs current table [%s]" % (c ,sv ,ov ))
2085
2102
2086
2103
@property
2087
2104
def nrows_expected (self ):
0 commit comments