We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
is this a bug in pandas? why null values in the grouped by field break the quantile?
df = pd.DataFrame({ 'category': ['A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'B'], 'value': [1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6] }) quantiles = df.groupby('category')['value'].quantile(0.75) print(quantiles) df2 = pd.DataFrame({ 'category': ['A', 'A', 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'B', 'B', np.nan], 'value': [1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6,1] }) quantiles2 = df2.groupby('category')['value'].quantile(0.75) print(quantiles2)
produces this output:
category A 4.75 B 4.75 Name: value, dtype: float64 category A 3.75 B 3.75 Name: value, dtype: float64
im using pandas 1.0.3
The text was updated successfully, but these errors were encountered:
Thanks @abdullahodibat for the report. duplicate of #33200 (comment)
this is a regression between 0.24 and 0.25 (#20405)
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Uh oh!
There was an error while loading. Please reload this page.
is this a bug in pandas? why null values in the grouped by field break the quantile?
produces this output:
im using pandas 1.0.3
The text was updated successfully, but these errors were encountered: