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
df1 = pd.DataFrame([[1, 2]], columns=["a", "b"]) gb1 = df1.groupby("a") result1 = gb1.describe() print(result1.to_string()) # b # count mean std min 25% 50% 75% max # a # 1 1.0 2.0 NaN 2.0 2.0 2.0 2.0 2.0 columns = pd.MultiIndex.from_tuples( [("a", ""), ("b", "c")], names=["b", "c"] ) df2 = pd.DataFrame([[1, 2]], columns=columns) gb2 = df2.groupby("a") result2 = gb2.describe() print(result2.to_string()) # b a b # c c # count mean std min 25% 50% 75% max count mean std min 25% 50% 75% max # a # 1 1.0 1.0 NaN 1.0 1.0 1.0 1.0 1.0 1.0 2.0 NaN 2.0 2.0 2.0 2.0 2.0
In the first case, the grouping a is not included in the results; in the second case the grouping a is. The grouping should not be described here.
a
The text was updated successfully, but these errors were encountered:
Closed by #50806
Sorry, something went wrong.
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
In the first case, the grouping
a
is not included in the results; in the second case the groupinga
is. The grouping should not be described here.The text was updated successfully, but these errors were encountered: