-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
API: DatetimeIndex / TimedeltaIndex 2d slicing should result in Index #10774
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
prob an oversite but not sure we should allow 2-d results at all |
Yep. Raise
|
sounds right |
I noticed this the other day. I agree with @jreback that we should raise an IndexError if the result has two or more dimensions. |
@jreback Since #31150 this is raising a Deprecation warning pandas/pandas/core/indexers.py Lines 263 to 270 in b1214af
Should it raise an IndexError instead of a deprecation warning? (as was agreed above) |
Since the 2D indexing behavior is currently deprecated, we should appropriately raise once this behavior is enforced. Closing but we can reopen if we don't get the correct behavior in the future. |
Following slices basically result in the same
Index
.But
DatetimeIndex
andTimedeltaIndex
doesn't because of following line.I understand these must be
Index
also, or any reason for this?The text was updated successfully, but these errors were encountered: