I've just upgraded to pandas 1.1 from 0.24 and I feel like I have lost my mind. Is it true that you can no longer index a DatetimeIndex with, you know, a date?
#This now fails!
import datetime as dt
s = pd.Series([1,2], pd.DatetimeIndex([dt.date(2020,1,1),dt.date(2020,1,2)]))
s.loc[dt.date(2020,1,2)]
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-49-18ac6239cd3a> in <module>
1 s = pd.Series([1,2], pd.DatetimeIndex([dt.date(2020,1,1),dt.date(2020,1,2)]))
----> 2 s.loc[dt.date(2020,1,2)]
....
Please tell me I'm wrong!