Skip to content

Conversation

@justmhie
Copy link

…ference

This commit addresses issue #56397 by removing outdated references to "the selected axis" in groupby documentation and clarifying that:

  1. DataFrame.groupby() always operates along axis 0 (rows)
  2. The axis parameter was removed in pandas 3.0
  3. To group by columns, users must transpose the DataFrame first

Changes:

  • Updated API reference docstring in DataFrame.groupby() to replace "selected axis" with "number of rows"
  • Enhanced user guide to explicitly state groupby operates on axis 0
  • Added note explaining the removal of the axis parameter and the need to use .T for column-wise grouping

Fixes #56397

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

…ference

This commit addresses issue pandas-dev#56397 by removing outdated references to
"the selected axis" in groupby documentation and clarifying that:

1. DataFrame.groupby() always operates along axis 0 (rows)
2. The axis parameter was removed in pandas 3.0
3. To group by columns, users must transpose the DataFrame first

Changes:
- Updated API reference docstring in DataFrame.groupby() to replace
  "selected axis" with "number of rows"
- Enhanced user guide to explicitly state groupby operates on axis 0
- Added note explaining the removal of the axis parameter and the
  need to use .T for column-wise grouping

Fixes pandas-dev#56397
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOC: groupby with column name

1 participant