Skip to content

Commit 2e13044

Browse files
committed
reverting some changes
1 parent 631f468 commit 2e13044

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

pandas/core/series.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1816,7 +1816,6 @@ def _set_name(
18161816
Parrot 20.0
18171817
Name: Max Speed, dtype: float64
18181818
1819-
We can pass a of values to group the `Series` data by custom labels:
18201819
18211820
>>> ser.groupby(["a", "b", "a", "b"]).mean()
18221821
a 210.0
@@ -1837,8 +1836,6 @@ def _set_name(
18371836
Parrot 25.0
18381837
Name: Max Speed, dtype: float64
18391838
1840-
We can group by a condition applied to the `Series` values:
1841-
18421839
>>> ser.groupby(ser > 100).mean()
18431840
Max Speed
18441841
False 25.0
@@ -1868,9 +1865,6 @@ def _set_name(
18681865
Parrot 25.0
18691866
Name: Max Speed, dtype: float64
18701867
1871-
We can also group by the `Type` level of the hierarchical index
1872-
to get the mean speed for each type:
1873-
18741868
>>> ser.groupby(level="Type").mean()
18751869
Type
18761870
Captive 210.0
@@ -1886,17 +1880,12 @@ def _set_name(
18861880
b 3
18871881
dtype: int64
18881882
1889-
To include `NA` values in the group keys, set `dropna=False`:
1890-
18911883
>>> ser.groupby(level=0, dropna=False).sum()
18921884
a 3
18931885
b 3
18941886
NaN 3
18951887
dtype: int64
18961888
1897-
We can also group by a custom with `NaN` values to handle
1898-
missing group labels:
1899-
19001889
>>> arrays = ['Falcon', 'Falcon', 'Parrot', 'Parrot']
19011890
>>> ser = pd.Series([390., 350., 30., 20.], index=arrays, name="Max Speed")
19021891
>>> ser.groupby(["a", "b", "a", np.nan]).mean()

0 commit comments

Comments
 (0)