-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Error ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasIO HDF5read_hdf, HDFStoreread_hdf, HDFStore
Milestone
Description
When querying a HDFStore
with a timestamp, on a column that (in my case, inadvertently) isn't a datetime, the error message isn't helpful; I think we can trap and show something better here.
df = pd.DataFrame({'date': ['2014-01-01', '2014-01-02'], 'values': [1, 2]})
df.to_hdf('store.h5', 'df', format='t', data_columns=['date'])
ts = pd.Timestamp('2014-01-01')
In [18]: pd.read_hdf('store.h5', 'df', where='date > ts')
File "<string>", line 1
(date > 1970-01-01 00:00:01.388556)
^
SyntaxError: invalid token
pandas 0.19.2
Metadata
Metadata
Assignees
Labels
Error ReportingIncorrect or improved errors from pandasIncorrect or improved errors from pandasIO HDF5read_hdf, HDFStoreread_hdf, HDFStore