When doing:
import pandas
from datetime import datetime
timestampparse = lambda t: datetime.fromtimestamp(float(t))
df = pandas.read_csv('blah.csv', delimiter=';', parse_dates=True, date_parser=timestampparse, index_col='DateTime', names=['DateTime', 'Sell'], header=None)
print df.ix['2015-12-02 12:02:21.070':'2015-12-02 12:40:21.070']
with this blah.csv file:
1449054136.83;1.05905
1449054139.25;1.05906
1449054139.86;1.05906
1449054140.47;1.05906
I get this error:
KeyError
How to access to a slice of a pandas dataframe, filtered by date?
Why doesn't df.ix['2015-12-02 12:02:19.000':'2015-12-02 12:40:21.070'] work?


View Solution