File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -137,9 +137,8 @@ We could naturally group by either the ``A`` or ``B`` columns, or both:
137137
138138 ``df.groupby('A') `` is just syntactic sugar for ``df.groupby(df['A']) ``.
139139
140- The above GroupBy will split the DataFrame on its index (rows). DataFrame groupby
141- always operates along axis 0 (rows). To split by columns instead, first transpose
142- the DataFrame:
140+ DataFrame groupby always operates along axis 0 (rows). To split by columns, first do
141+ a transpose:
143142
144143.. ipython ::
145144
@@ -152,11 +151,6 @@ the DataFrame:
152151
153152 In [5]: grouped = df.T.groupby(get_letter_type)
154153
155- .. note ::
156-
157- Prior to pandas 3.0, groupby had an ``axis `` parameter. This has been removed.
158- To group by columns, transpose your DataFrame using ``.T `` before calling groupby.
159-
160154pandas :class: `~pandas.Index ` objects support duplicate values. If a
161155non-unique index is used as the group key in a groupby operation, all values
162156for the same index value will be considered to be in one group and thus the
You can’t perform that action at this time.
0 commit comments