Skip to content

ASV: Add benchmark for indexing with .loc for sorted/unsorted DatetimeIndex #38690

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

Closed
mzeitlin11 opened this issue Dec 25, 2020 · 4 comments · Fixed by #46193 or #46198
Closed

ASV: Add benchmark for indexing with .loc for sorted/unsorted DatetimeIndex #38690

mzeitlin11 opened this issue Dec 25, 2020 · 4 comments · Fixed by #46193 or #46198
Assignees
Labels
Benchmark Performance (ASV) benchmarks good first issue Indexing Related to indexing on series/frames, not to indexes themselves Performance Memory or execution speed performance
Milestone

Comments

@mzeitlin11
Copy link
Member

xref #17754, a benchmark should be added for indexing with .loc for sorted/unsorted DatetimeIndex. With a constructed DatetimeIndex, for example

dates = pd.date_range('2011-1-1', periods=500000, freq='min')
index = np.random.choice(dates, 500000, replace=True)
df = pd.DataFrame(index=index, data={'a': 1})
df_sorted = df.sort_index()

the behavior of interest to benchmark is

df.loc['2011-6-11']

and

df_sorted.loc['2011-6-11']
@mzeitlin11 mzeitlin11 added Bug Needs Triage Issue that has not been reviewed by a pandas team member Benchmark Performance (ASV) benchmarks Performance Memory or execution speed performance Indexing Related to indexing on series/frames, not to indexes themselves and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 25, 2020
@ngcd04-fa07
Copy link

Hey
This would be my first open-source contribution, and I'd love to work on this. Would you please assign this to me and guide me a bit as to what needs to be done?
Thank you

@sonalprabhu
Copy link

Is anyone working on this?
If not, cn I assign this issue to myself?

@mzeitlin11
Copy link
Member Author

Anyone is welcome to work on this! Just comment "take" and you'll be automatically assigned. See https://pandas.pydata.org/docs/development/contributing_codebase.html#running-the-performance-test-suite for additional information about the task of adding a benchmark

@sonalprabhu
Copy link

take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Benchmark Performance (ASV) benchmarks good first issue Indexing Related to indexing on series/frames, not to indexes themselves Performance Memory or execution speed performance
Projects
None yet
5 participants