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
Tested pandas 0.11, and 0.12, both exhibit this problem
import pandas as pd data = pd.DataFrame({'id_field' : [100, 100, 200, 300], 'category' : ['a','b','c','c'], 'value' : [1,2,3,4]}) def filt1(x): if x.shape[0] == 1: return x.copy() else: return x[x.category == 'c'] def filt2(x): if x.shape[0] == 1: return x else: return x[x.category == 'c'] #works fine print data.groupby('id_field').apply(filt1) #throws error print data.groupby('id_field').apply(filt2)
The text was updated successfully, but these errors were encountered:
@hhuuggoo very subtle bug, thanks
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Tested pandas 0.11, and 0.12, both exhibit this problem
The text was updated successfully, but these errors were encountered: