Skip to content

Commit

Permalink
DOC: Updating Series.agg docstring (#22474)
Browse files Browse the repository at this point in the history
  • Loading branch information
alimcmaster1 authored and jorisvandenbossche committed Aug 24, 2018
1 parent 64de074 commit 447580e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion ci/doctests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if [ "$DOCTEST" ]; then
fi

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

if [ $? -ne "0" ]; then
RET=1
Expand Down
3 changes: 1 addition & 2 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4439,7 +4439,6 @@ def pipe(self, func, *args, **kwargs):
- function.
- list of functions.
- dict of column names -> functions (or list of functions).
%(axis)s
*args
Positional arguments to pass to `func`.
Expand Down Expand Up @@ -8146,7 +8145,7 @@ def mask(self, cond, other=np.nan, inplace=False, axis=None, level=None,
Parameters
----------
periods : int
Number of periods to move, can be positive or negative
Number of periods to move, can be positive or negative.
freq : DateOffset, timedelta, or time rule string, optional
Increment to use from the tseries module or time rule (e.g. 'EOM').
See Notes.
Expand Down
27 changes: 14 additions & 13 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,6 @@ def reset_index(self, level=None, drop=False, name=None, inplace=False):
Examples
--------
>>> s = pd.Series([1, 2, 3, 4], name='foo',
... index=pd.Index(['a', 'b', 'c', 'd'], name='idx'))
Expand Down Expand Up @@ -3046,21 +3045,27 @@ def _gotitem(self, key, ndim, subset=None):
Examples
--------
>>> s = pd.Series(np.random.randn(10))
>>> s = pd.Series([1, 2, 3, 4])
>>> s
0 1
1 2
2 3
3 4
dtype: int64
>>> s.agg('min')
-1.3018049988556679
1
>>> s.agg(['min', 'max'])
min -1.301805
max 1.127688
dtype: float64
min 1
max 4
dtype: int64
See also
--------
pandas.Series.apply
pandas.Series.transform
pandas.Series.apply : Invoke function on a Series.
pandas.Series.transform : Transform function producing
a Series with like indexes.
""")

@Appender(_agg_doc)
Expand Down Expand Up @@ -3315,7 +3320,6 @@ def rename(self, index=None, **kwargs):
Examples
--------
>>> s = pd.Series([1, 2, 3])
>>> s
0 1
Expand All @@ -3337,7 +3341,6 @@ def rename(self, index=None, **kwargs):
3 2
5 3
dtype: int64
"""
kwargs['inplace'] = validate_bool_kwarg(kwargs.get('inplace', False),
'inplace')
Expand Down Expand Up @@ -3507,7 +3510,6 @@ def memory_usage(self, index=True, deep=False):
Examples
--------
>>> s = pd.Series(range(3))
>>> s.memory_usage()
104
Expand Down Expand Up @@ -3591,7 +3593,6 @@ def isin(self, values):
Examples
--------
>>> s = pd.Series(['lama', 'cow', 'lama', 'beetle', 'lama',
... 'hippo'], name='animal')
>>> s.isin(['cow', 'lama'])
Expand Down

0 comments on commit 447580e

Please sign in to comment.