Skip to content

PERF: avoid copies where possible #17449

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
jreback opened this issue Sep 6, 2017 · 2 comments · Fixed by #18231
Closed

PERF: avoid copies where possible #17449

jreback opened this issue Sep 6, 2017 · 2 comments · Fixed by #18231
Labels
Performance Memory or execution speed performance Reshaping Concat, Merge/Join, Stack/Unstack, Explode Timezones Timezone data dtype
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Sep 6, 2017

This copies 3 times (even with the default copy=False)

In [2]: i = pd.date_range('20170101', periods=3, tz='US/Eastern')
In [3]: pd.Series(i)
Out[3]: 
0   2017-01-01 00:00:00-05:00
1   2017-01-02 00:00:00-05:00
2   2017-01-03 00:00:00-05:00
dtype: datetime64[ns, US/Eastern]

In theory we could get this to 0 copy (this is already correctly dtyped, so needs no conversion).

@jreback jreback added Performance Memory or execution speed performance Reshaping Concat, Merge/Join, Stack/Unstack, Explode Timezones Timezone data dtype labels Sep 6, 2017
@jreback jreback added this to the 0.21.0 milestone Sep 6, 2017
@jreback
Copy link
Contributor Author

jreback commented Sep 6, 2017

cc @wesm

@jreback jreback modified the milestones: 0.21.0, Interesting Issues Sep 23, 2017
jreback added a commit to jreback/pandas that referenced this issue Nov 11, 2017
jreback added a commit to jreback/pandas that referenced this issue Nov 11, 2017
jreback added a commit to jreback/pandas that referenced this issue Nov 12, 2017
@jreback jreback modified the milestones: Interesting Issues, 0.22.0 Nov 12, 2017
jreback added a commit to jreback/pandas that referenced this issue Nov 12, 2017
jreback added a commit to jreback/pandas that referenced this issue Nov 20, 2017
jreback added a commit that referenced this issue Nov 21, 2017
@wesm
Copy link
Member

wesm commented Nov 21, 2017

very nice, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Memory or execution speed performance Reshaping Concat, Merge/Join, Stack/Unstack, Explode Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants