We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
>>> df = pd.DataFrame(np.random.randint(1, 9, (2, 3)), columns=['jim', 'joe', 'jolie']) >>> df jim joe jolie 0 4 7 8 1 7 8 3 >>> ts = df['joe'] * 0 >>> ts.name 'joe' >>> gr = df.groupby(ts) >>> gr.nth(0) # this invokes _set_selection_from_grouper internally jim jolie joe 7 4 8 >>> gr.apply(sum) # joe column is gone jim jolie joe 0 11 11
whereas:
>>> df.groupby(ts).apply(sum) jim joe jolie joe 0 11 15 11
What happens is that this line removes the column from selection if it has the same name as the grouper.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
whereas:
What happens is that this line removes the column from selection if it has the same name as the grouper.
The text was updated successfully, but these errors were encountered: