Skip to content
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

Merged
merged 8 commits into from
Mar 4, 2022

Conversation

weikhor
Copy link
Contributor

@weikhor weikhor commented Mar 2, 2022

index = np.array(dti)
df = DataFrame(index=index, data={"a": 1})
df_sort = df.sort_index()
self.df = df
Copy link
Member

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.

@weikhor
Copy link
Contributor Author

weikhor commented Mar 3, 2022

@mroeschke Hi The testing pipeline in green. Thank for review.

@jreback jreback added the Benchmark Performance (ASV) benchmarks label Mar 3, 2022
@jreback jreback added this to the 1.5 milestone Mar 3, 2022
chean.wei.khor added 2 commits March 5, 2022 00:03
@weikhor
Copy link
Contributor Author

weikhor commented Mar 4, 2022

@mroeschke Pipeline check in green

@mroeschke mroeschke merged commit f484ddc into pandas-dev:main Mar 4, 2022
@mroeschke
Copy link
Member

Thanks for following up @weikhor

@weikhor weikhor deleted the benchmark-for-indexing branch March 5, 2022 03:45
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
…ex (pandas-dev#46198)

* add benchmark

* add

* add benchmark

* add

* add

* add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Benchmark Performance (ASV) benchmarks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ASV: Add benchmark for indexing with .loc for sorted/unsorted DatetimeIndex
3 participants