Skip to content

Commit 9fc07a7

Browse files
committed
corrected _convert_index's pytables types for handling datetime.date indexes
1 parent d7330b3 commit 9fc07a7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/io/pytables.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -717,8 +717,8 @@ def _convert_index(index):
717717
return converted, 'datetime', _tables().Time64Col()
718718
elif isinstance(values[0], date):
719719
converted = np.array([time.mktime(v.timetuple()) for v in values],
720-
dtype=np.int64)
721-
return converted, 'date', _tables().Time64Col()
720+
dtype=np.int32)
721+
return converted, 'date', _tables().Time32Col()
722722
elif isinstance(values[0], basestring):
723723
converted = np.array(list(values), dtype=np.str_)
724724
itemsize = converted.dtype.itemsize

0 commit comments

Comments
 (0)