-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: Add recipe for shifting groups of values based on the index #6917
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
index=[u'Last Gunfighter', u'Last Gunfighter', u'Last Gunfighter', | ||
u'Paynter', u'Paynter', u'Paynter']); df | ||
|
||
df['beyer_shifted'] = df.groupby(level=0)['beyer'].apply(lambda grp: grp.shift(1)); df |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can u put the final df on next line (rather than semi colon it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think this line is misaligned by one space with the initial df = ..
So edited. |
DOC: Add recipe for shifting groups of values based on the index
@unutbu thanks! |
It think in 0.14 enabled i'll fixup |
Ah. That works as far back as 0.8.0 as well. |
Just for fun I wanted to use
I suppose I could write a unittest script with a setUp method which performs the installation, and then run |
ahh...that's the automatic function call generation, kind of a syntactic sugar I don't any easier way to run git bisect....only used it a couple of times. I think bisect will do the install for you (e.g. it checkouts a particular commit), runs setup, then runs the code.... |
No description provided.