Commit 7d0980c
committed
DOC: Clarify groupby operates on axis 0 and remove 'selected axis' reference
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 #563971 parent ea75dd7 commit 7d0980c
2 files changed
+9
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| |||
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
154 | 160 | | |
155 | 161 | | |
156 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9432 | 9432 | | |
9433 | 9433 | | |
9434 | 9434 | | |
9435 | | - | |
| 9435 | + | |
9436 | 9436 | | |
9437 | 9437 | | |
9438 | 9438 | | |
| |||
0 commit comments