-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
Add benchmark for indexing with .loc for sorted/unsorted DatetimeIndex #46198
Conversation
asv_bench/benchmarks/indexing.py
Outdated
index = np.array(dti) | ||
df = DataFrame(index=index, data={"a": 1}) | ||
df_sort = df.sort_index() | ||
self.df = df |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think one of these should be unsorted. Currently df
and df_sort
will both be sorted in the index.
You can create the unsorted one like index[10] = index[20]
and creating a new DataFrame.
@mroeschke Hi The testing pipeline in green. Thank for review. |
@mroeschke Pipeline check in green |
Thanks for following up @weikhor |
…ex (pandas-dev#46198) * add benchmark * add * add benchmark * add * add * add
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.