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

Creating DatetimeIndex from date column performance regression #6150

Closed
hayd opened this issue Jan 28, 2014 · 0 comments · Fixed by #6153
Closed

Creating DatetimeIndex from date column performance regression #6150

hayd opened this issue Jan 28, 2014 · 0 comments · Fixed by #6153
Labels
Datetime Datetime data dtype Indexing Related to indexing on series/frames, not to indexes themselves Performance Memory or execution speed performance
Milestone

Comments

@hayd
Copy link
Contributor

hayd commented Jan 28, 2014

This seems to be significantly slower since 0.12:

import numpy as np; import pandas as pd; import datetime
s = pd.Series([np.random.choice(pd.date_range(datetime.datetime(1992,1,1,0,0,0),datetime.datetime(2014,1,1,0,0,0),freq='H')) for i in range(1200)])
# s is datetime64 column.

In 0.12:

In [12]: %timeit pd.DatetimeIndex(s)
10000 loops, best of 3: 15.4 µs per loop

pandas 0.13-dev:

In [13]: %timeit pd.DatetimeIndex(s)
100 loops, best of 3: 3.21 ms per loop

Had originally thought this was normalize...

cc @jreback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Indexing Related to indexing on series/frames, not to indexes themselves Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant