-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Slicing on DatetimeIndex throws KeyError: [int] not found #13090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
So this requires montonicity (sortedness). documentation was added here to describe this. Though I think we could have a better error message in this case (still a
|
That works, thank you! Feel free to close. |
We should really be returning an Also, it's unfortunate that we're returning in integer as the error message instead of the original time stamp. |
Hi. I am trying to remove duplicated rows based on time from date column. Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): |
@sarwatfatimam Please open a separate issue for this (or first ask on gitter or on the mailing list) if you think there is a bug. But, I think you are using |
I've the same issue with pandas
based on
BTW: One workaround is to convert each col to a series, window each series and combine the series back to a dataframe. With series I had never problems with slicing so far. |
Ran into this error with DatetimeIndex and |
Code Sample, a copy-pastable example if possible
Unfortunately can't reproduce it with other examples. Only this which I load from csv.

txn.loc[pd.Timestamp('2014-06-04 00:00:00'):]
Expected Output
Slice of everything after '2014-06-04 00:00:00'.
output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: