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 = DataFrame( { "a": [1, 1, 2], "b": [np.nan, 4, 5], "c": [6, 7, 8], } ) gb = df.groupby("a")[["b"]] result = gb.nth(0, dropna="any")
raises ValueError: Item wrong length 3 instead of 2. If you remove the null value, column selection is no longer reflected in the result
ValueError: Item wrong length 3 instead of 2.
df = DataFrame( { "a": [1, 1, 2], "b": [3, 4, 5], "c": [6, 7, 8], } ) gb = df.groupby("a")[["b"]] result = gb.nth(0, dropna="any") print(result) # a b c # 0 1 3 6 # 2 2 5 8
Replacing dropna=None in the above gives the expected
dropna=None
b 0 3 2 5
The text was updated successfully, but these errors were encountered:
rhshadrach
Successfully merging a pull request may close this issue.
raises
ValueError: Item wrong length 3 instead of 2.
If you remove the null value, column selection is no longer reflected in the resultReplacing
dropna=None
in the above gives the expectedThe text was updated successfully, but these errors were encountered: