Skip to content

PERF: Panel.pct_change #6922

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 Apr 22, 2014 · 1 comment
Closed

PERF: Panel.pct_change #6922

jreback opened this issue Apr 22, 2014 · 1 comment
Labels
Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Performance Memory or execution speed performance

Comments

@jreback
Copy link
Contributor

jreback commented Apr 22, 2014

related #6826, #6909

Just putting this up there if anyone has any ideas. The filling scales with the length of the axis so this is unavoidable (well it could be done in cython but would need a 3d version of certain functions).

can think about changing the default to fill_method=None from fill_method='pad'

In [8]: index = pd.date_range(start="2000", freq="D", periods=1000)

In [9]: panel = pd.Panel(np.random.randn(100, len(index), 1000))

In [10]: %timeit panel.pct_change(1, axis="major", fill_method='pad')
1 loops, best of 3: 3.62 s per loop

In [11]: %timeit panel.pct_change(1, axis="major", fill_method=None)
1 loops, best of 3: 1.46 s per loop
@jreback jreback added this to the 0.15.0 milestone Apr 22, 2014
@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 3, 2015
@jreback
Copy link
Contributor Author

jreback commented Jul 10, 2017

closing as Panels are deprecated

@jreback jreback closed this as completed Jul 10, 2017
@jreback jreback modified the milestones: Next Major Release, won't fix Jul 11, 2017
@TomAugspurger TomAugspurger modified the milestones: won't fix, No action Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Performance Memory or execution speed performance
Projects
None yet
Development

No branches or pull requests

3 participants