-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
API/BUG: DatetimeIndex.argsort does not match DatetimeArray.argsort #37863
Comments
@jreback @mroeschke tracking this down im finding that changing it causes test failures largely in resample tests. For an example, if we disable the needs_i8_conversion check in Index.argsort, then the following:
If we breakpoint just before the call to The only relevant-looking argsort call is in
Any thoughts? |
The DatetimeIndex returns
self.asi8.argsort(*args, **kwargs)
, while the DatetimeArray uses the M8[ns] values. This puts NaTs at the front for DTI and the end for DTA.Changing the DTI method (actually the DTI/TDI/PI methods) to match their array counterparts breaks 12 tests, 11 of them resample, 1 test_grouping.
The text was updated successfully, but these errors were encountered: