Closed
Description
Hello all
I don't know if this has been already fixed in developing 0.12, but just in case:
it seemed that indexing with datetime.date does not work properly.
E.g. the code
IDX=[datetime.strptime(yy,'%Y-%m-%d') for yy in ["2005-01-01","2006-01-01","2006-01-01","2007-01-01"]]
IDX
df = pd.DataFrame([1,2,3,4], index=IDX)
print type(df.index[0])
print df.ix['2005-01-01']
df[:'2006-01-02']
works correctly. And the code
IDX=[datetime.date(datetime.strptime(yy,'%Y-%m-%d')) for yy in ["2005-01-01","2006-01-01","2006-01-01","2007-01-01"]]
IDX
df = pd.DataFrame([1,2,3,4], index=IDX)
print type(df.index[0])
print df.ix['2005-01-01']
df[:'2006-01-02']
failed with the issue "TypeError: can't compare datetime.date to str"
Metadata
Metadata
Assignees
Labels
No labels