Skip to content

Commit 447580e

Browse files
alimcmaster1jorisvandenbossche
authored andcommitted
DOC: Updating Series.agg docstring (#22474)
1 parent 64de074 commit 447580e

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

ci/doctests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if [ "$DOCTEST" ]; then
2828
fi
2929

3030
pytest --doctest-modules -v pandas/core/series.py \
31-
-k"-agg -map -nlargest -nonzero -nsmallest -reindex -searchsorted -to_dict"
31+
-k"-nlargest -nonzero -nsmallest -reindex -searchsorted -to_dict"
3232

3333
if [ $? -ne "0" ]; then
3434
RET=1

pandas/core/generic.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -4439,7 +4439,6 @@ def pipe(self, func, *args, **kwargs):
44394439
- function.
44404440
- list of functions.
44414441
- dict of column names -> functions (or list of functions).
4442-
44434442
%(axis)s
44444443
*args
44454444
Positional arguments to pass to `func`.
@@ -8146,7 +8145,7 @@ def mask(self, cond, other=np.nan, inplace=False, axis=None, level=None,
81468145
Parameters
81478146
----------
81488147
periods : int
8149-
Number of periods to move, can be positive or negative
8148+
Number of periods to move, can be positive or negative.
81508149
freq : DateOffset, timedelta, or time rule string, optional
81518150
Increment to use from the tseries module or time rule (e.g. 'EOM').
81528151
See Notes.

pandas/core/series.py

+14-13
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,6 @@ def reset_index(self, level=None, drop=False, name=None, inplace=False):
11321132
11331133
Examples
11341134
--------
1135-
11361135
>>> s = pd.Series([1, 2, 3, 4], name='foo',
11371136
... index=pd.Index(['a', 'b', 'c', 'd'], name='idx'))
11381137
@@ -3046,21 +3045,27 @@ def _gotitem(self, key, ndim, subset=None):
30463045
Examples
30473046
--------
30483047
3049-
>>> s = pd.Series(np.random.randn(10))
3048+
>>> s = pd.Series([1, 2, 3, 4])
3049+
>>> s
3050+
0 1
3051+
1 2
3052+
2 3
3053+
3 4
3054+
dtype: int64
30503055
30513056
>>> s.agg('min')
3052-
-1.3018049988556679
3057+
1
30533058
30543059
>>> s.agg(['min', 'max'])
3055-
min -1.301805
3056-
max 1.127688
3057-
dtype: float64
3060+
min 1
3061+
max 4
3062+
dtype: int64
30583063
30593064
See also
30603065
--------
3061-
pandas.Series.apply
3062-
pandas.Series.transform
3063-
3066+
pandas.Series.apply : Invoke function on a Series.
3067+
pandas.Series.transform : Transform function producing
3068+
a Series with like indexes.
30643069
""")
30653070

30663071
@Appender(_agg_doc)
@@ -3315,7 +3320,6 @@ def rename(self, index=None, **kwargs):
33153320
33163321
Examples
33173322
--------
3318-
33193323
>>> s = pd.Series([1, 2, 3])
33203324
>>> s
33213325
0 1
@@ -3337,7 +3341,6 @@ def rename(self, index=None, **kwargs):
33373341
3 2
33383342
5 3
33393343
dtype: int64
3340-
33413344
"""
33423345
kwargs['inplace'] = validate_bool_kwarg(kwargs.get('inplace', False),
33433346
'inplace')
@@ -3507,7 +3510,6 @@ def memory_usage(self, index=True, deep=False):
35073510
35083511
Examples
35093512
--------
3510-
35113513
>>> s = pd.Series(range(3))
35123514
>>> s.memory_usage()
35133515
104
@@ -3591,7 +3593,6 @@ def isin(self, values):
35913593
35923594
Examples
35933595
--------
3594-
35953596
>>> s = pd.Series(['lama', 'cow', 'lama', 'beetle', 'lama',
35963597
... 'hippo'], name='animal')
35973598
>>> s.isin(['cow', 'lama'])

0 commit comments

Comments
 (0)