-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: GH11517 add multiindex column names after describe() #11546
New issue
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
BUG: GH11517 add multiindex column names after describe() #11546
Conversation
Please add a test for this :) |
Hi, I have added test case for that . |
@@ -1471,6 +1471,16 @@ def test_describe_typefiltering_groupby(self): | |||
self.assertTrue(G.describe(include=['number', 'object']).shape == (22, 3)) | |||
self.assertTrue(G.describe(include='all').shape == (26, 4)) | |||
|
|||
# GH 11517 | |||
def test_describe_multi_index_df_column_names(self): | |||
df = pd.DataFrame({'A': ['foo', 'bar', 'foo', 'bar', 'foo', 'bar', 'foo', 'foo'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do the same tests, but just group on A (to simulate a non-hierarchical index).
pls add a whatsnew note for 0.17.1 |
Thanks for comments. |
'B': ['one', 'one', 'two', 'three', 'two', 'two', 'one', 'three'], | ||
'C': np.random.randn(8), | ||
'D': np.random.randn(8)}) | ||
# test for hierarchical index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great ,use a blank line between different cases (e.g. before the comment).
move the isssue number inside the test, and provide a description of what this tests is doing
couple of comments. pls squash when done. ping on green. |
I have made the changes. |
looks good. pls squash to a single commit. ping when green. |
Done. Please check. |
65600b4
to
1c66021
Compare
Apologies for not getting it right the first time |
BUG: GH11517 add multiindex column names after describe()
thank you sir! |
Hi,
This fixes the bug mentioned in #11517
I have added column names after the describe operation.
Request you to review the change and merge it.
Thanks