I am able to read and slice pandas dataframe using python datetime objects, however I am forced to use only existing dates in index. For example, this works:
You can use a simple mask to accomplish this:
date_mask = (data.index > start) & (data.index < end) dates = data.index[date_mask] data.ix[dates]
By the way, this works for hierarchical indexing as well. In that case data.index would be replaced with data.index.levels[0] or similar.
data.index
data.index.levels[0]