-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Change Panel.shift to use NDFrame.shift #6605
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
Conversation
hmm. I bet the rolling stuff that makes a 2-d much faster makes this much slower. I think you mnay have to roll this in a different way somehow. |
Hm. You talking about #6404? I'm going to setup a test battery just to get an idea of what the timings are. I think that the shift isn't that much worse than a straight copy. The regression is going to look disgusting compared to grabbing a view :P |
#6404 was merged in, pls rebase and see about the perf tests and what if anything can do about them |
With #6747 the panel shift speed is on par with pre-quick-shift. http://nbviewer.ipython.org/gist/dalejung/9731798/panel%20shift.ipynb |
@jreback ping on green. |
gr8 can you add a release note (referencing the issue) and squash downto 1 commit ping me whengreen |
PRF: Adding Panels.shift test DOC: Panel.shift no longer drops periods.
@jreback green |
I thiought this was fixed?
|
That particularly perf hit won't be fixable if The quick shift fixes #6747 fixes speed for So the timeline:
Sorry, I think the fix from 3->4 was conflated with fixing the perf hit from 1->2. Let me know if I need to back out the PR. |
ok either back it out completely or so it's at least in 1 place (even if special cased) |
moved discussion to #6826 |
…#6826 TST: Make sure Panel.shift retains dtypes DOC: removed previous doc entries for pandas-dev#6605 Re-add note about dropping shifted periods DOC: added note about bug fix don't pass on freq
closes #4867
This brings
Panel.shift
in line withDataFrame.shift
. The shifted data retains the same dimensions/indexes and doesn't drop the empty rows. So I have two concerns.Here is the vbench.
The previous implementation did not create a copy and thus had a constant time. The general shift scales linearly.
I think the current implementation just defers work done in later alignments, but I can only speak to my own workflow.