Skip to content

TST: Test to verify behavior of groupby.std with no numeric columns and numeric_only=True #51761

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

Merged

Conversation

NumanIjaz
Copy link
Contributor

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@@ -1915,7 +1915,7 @@ def std(
.. versionadded:: 1.4.0

numeric_only : bool, default False
Include only `float`, `int` or `boolean` data.
Include only `float`, `int` or `boolean` columns.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe data is used here because this docstring is shared by DataFrameGroupBy and SeriesGroupBy; the latter does not have columns. I think this should be reverted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I have reverted these changes. But should't we have separate docstrings for DataFrameGroupBy and SeriesGroupBy for more clarity?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could template these docstrings or just separate them out entirely; but that should be a separate PR.

@NumanIjaz NumanIjaz requested a review from rhshadrach March 5, 2023 00:49
@mroeschke mroeschke added Testing pandas testing functions or related to the test suite Groupby labels Mar 6, 2023
Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rhshadrach rhshadrach added this to the 2.1 milestone Mar 6, 2023
@rhshadrach rhshadrach merged commit 056edfa into pandas-dev:main Mar 6, 2023
@rhshadrach
Copy link
Member

Thanks @NumanIjaz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Groupby Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: groupby.std with no numeric columns and numeric_only=True raises
3 participants