Skip to content

DOC: Fix PR06 errors in Series docstrings (#28253) #28288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pandas/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1289,17 +1289,17 @@ def value_counts(

Parameters
----------
normalize : boolean, default False
normalize : bool, default False
If True then the object returned will contain the relative
frequencies of the unique values.
sort : boolean, default True
sort : bool, default True
Sort by frequencies.
ascending : boolean, default False
ascending : bool, default False
Sort in ascending order.
bins : integer, optional
bins : int, optional
Rather than count values, group them into half-open bins,
a convenience for ``pd.cut``, only works with numeric data.
dropna : boolean, default True
dropna : bool, default True
Don't include counts of NaN.

Returns
Expand Down Expand Up @@ -1496,7 +1496,7 @@ def memory_usage(self, deep=False):
size_hint="",
sort=textwrap.dedent(
"""\
sort : boolean, default False
sort : bool, default False
Sort `uniques` and shuffle `labels` to maintain the
relationship.
"""
Expand Down
33 changes: 18 additions & 15 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2313,7 +2313,7 @@ def to_json(
floating point values.
force_ascii : bool, default True
Force encoded string to be ASCII.
date_unit : string, default 'ms' (milliseconds)
date_unit : str, default 'ms' (milliseconds)
The time unit to encode to, governs timestamp and ISO8601
precision. One of 's', 'ms', 'us', 'ns' for second, millisecond,
microsecond, and nanosecond respectively.
Expand Down Expand Up @@ -2533,8 +2533,9 @@ def to_msgpack(self, path_or_buf=None, encoding="utf-8", **kwargs):

Parameters
----------
path : string File path, buffer-like, or None
if None, return generated bytes
path : str, buffer-like, or None
Destination for the serialized object.
If None, return generated bytes
append : bool whether to append to an existing msgpack
(default is False)
compress : type of compressor (zlib or blosc), default to None (no
Expand Down Expand Up @@ -4621,8 +4622,9 @@ def filter(self, items=None, like=None, regex=None, axis=None):
Keep labels from axis for which "like in label == True".
regex : str (regular expression)
Keep labels from axis for which re.search(regex, label) == True.
axis : int or string axis name
The axis to filter on. By default this is the info axis,
axis : {0 or ‘index’, 1 or ‘columns’, None}, default None
The axis to filter on, expressed either as an index (int)
or axis name (str). By default this is the info axis,
'index' for Series, 'columns' for DataFrame.

Returns
Expand Down Expand Up @@ -4855,7 +4857,7 @@ def sample(
random_state : int or numpy.random.RandomState, optional
Seed for the random number generator (if int), or numpy RandomState
object.
axis : int or string, optional
axis : {0 or ‘index’, 1 or ‘columns’, None}, default None
Axis to sample. Accepts axis number or name. Default is stat axis
for given data type (0 for Series and DataFrames).

Expand Down Expand Up @@ -8462,7 +8464,7 @@ def first(self, offset):

Parameters
----------
offset : string, DateOffset, dateutil.relativedelta
offset : str, DateOffset, dateutil.relativedelta

Returns
-------
Expand Down Expand Up @@ -8525,7 +8527,7 @@ def last(self, offset):

Parameters
----------
offset : string, DateOffset, dateutil.relativedelta
offset : str, DateOffset, dateutil.relativedelta

Returns
-------
Expand Down Expand Up @@ -9133,7 +9135,7 @@ def _where(

Parameters
----------
cond : boolean %(klass)s, array-like, or callable
cond : bool %(klass)s, array-like, or callable
Where `cond` is %(cond)s, keep the original value. Where
%(cond_rev)s, replace with corresponding value from `other`.
If `cond` is callable, it is computed on the %(klass)s and
Expand Down Expand Up @@ -9440,9 +9442,10 @@ def tshift(self, periods=1, freq=None, axis=0):
----------
periods : int
Number of periods to move, can be positive or negative
freq : DateOffset, timedelta, or time rule string, default None
Increment to use from the tseries module or time rule (e.g. 'EOM')
axis : int or basestring
freq : DateOffset, timedelta, or str, default None
Increment to use from the tseries module
or time rule expressed as a string (e.g. 'EOM')
axis : {0 or ‘index’, 1 or ‘columns’, None}, default 0
Corresponds to the axis that contains the Index

Returns
Expand Down Expand Up @@ -9500,9 +9503,9 @@ def truncate(self, before=None, after=None, axis=None, copy=True):

Parameters
----------
before : date, string, int
before : date, str, int
Truncate all rows before this index value.
after : date, string, int
after : date, str, int
Truncate all rows after this index value.
axis : {0 or 'index', 1 or 'columns'}, optional
Axis to truncate. Truncates the index (rows) by default.
Expand Down Expand Up @@ -10311,7 +10314,7 @@ def _check_percentile(self, q):
How to handle NAs before computing percent changes.
limit : int, default None
The number of consecutive NAs to fill before stopping.
freq : DateOffset, timedelta, or offset alias string, optional
freq : DateOffset, timedelta, or str, optional
Increment to use from time series API (e.g. 'M' or BDay()).
**kwargs
Additional keyword arguments are passed into
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1788,7 +1788,7 @@ def to_sparse(self, kind="block", fill_value=None):

Parameters
----------
kind : {'block', 'integer'}, default 'block'
kind : {'block', 'int'}, default 'block'
fill_value : float, defaults to NaN (missing)
Value to use for filling NaN values.

Expand Down
2 changes: 1 addition & 1 deletion pandas/plotting/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ def kde(self, bw_method=None, ind=None, **kwargs):
'scott', 'silverman', a scalar constant or a callable.
If None (default), 'scott' is used.
See :class:`scipy.stats.gaussian_kde` for more information.
ind : NumPy array or integer, optional
ind : NumPy array or int, optional
Evaluation points for the estimated PDF. If None (default),
1000 equally spaced points are used. If `ind` is a NumPy array, the
KDE is evaluated at the points passed. If `ind` is an integer,
Expand Down