Skip to content

DOC: PR06 docstring fixes #28807

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 17 commits into from
Oct 11, 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
4 changes: 2 additions & 2 deletions pandas/core/arrays/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ def from_codes(cls, codes, categories=None, ordered=None, dtype=None):
Parameters
----------
codes : array-like, integers
codes : array-like of int
An integer array, where each integer points to a category in
categories or dtype.categories, or else is -1 for NaN.
categories : index-like, optional
Expand All @@ -647,7 +647,7 @@ def from_codes(cls, codes, categories=None, ordered=None, dtype=None):
Whether or not this categorical is treated as an ordered
categorical. If not given here or in `dtype`, the resulting
categorical will be unordered.
dtype : CategoricalDtype or the string "category", optional
dtype : CategoricalDtype or "category", optional
If :class:`CategoricalDtype`, cannot be used together with
`categories` or `ordered`.
Expand Down
6 changes: 3 additions & 3 deletions pandas/core/arrays/datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ def value_counts(self, dropna=False):
Parameters
----------
dropna : boolean, default True
dropna : bool, default True
Don't include counts of NaT values.
Returns
Expand Down Expand Up @@ -728,7 +728,7 @@ def _maybe_mask_results(self, result, fill_value=iNaT, convert=None):
----------
result : a ndarray
fill_value : object, default iNaT
convert : string/dtype or None
convert : str, dtype or None
Returns
-------
Expand Down Expand Up @@ -1168,7 +1168,7 @@ def _time_shift(self, periods, freq=None):
----------
periods : int
Number of periods to shift by.
freq : pandas.DateOffset, pandas.Timedelta, or string
freq : pandas.DateOffset, pandas.Timedelta, or str
Frequency increment to shift by.
"""
if freq is not None and freq != self.freq:
Expand Down
8 changes: 4 additions & 4 deletions pandas/core/arrays/integer.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def integer_array(values, dtype=None, copy=False):
values : 1D list-like
dtype : dtype, optional
dtype to coerce
copy : boolean, default False
copy : bool, default False
Returns
-------
Expand Down Expand Up @@ -140,8 +140,8 @@ def coerce_to_array(values, dtype, mask=None, copy=False):
----------
values : 1D list-like
dtype : integer dtype
mask : boolean 1D array, optional
copy : boolean, default False
mask : bool 1D array, optional
copy : bool, default False
if True, copy the input
Returns
Expand Down Expand Up @@ -542,7 +542,7 @@ def value_counts(self, dropna=True):
Parameters
----------
dropna : boolean, default True
dropna : bool, default True
Don't include counts of NaN.
Returns
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/arrays/period.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def to_timestamp(self, freq=None, how="start"):
Parameters
----------
freq : string or DateOffset, optional
freq : str or DateOffset, optional
Target frequency. The default is 'D' for week or longer,
'S' otherwise
how : {'s', 'e', 'start', 'end'}
Expand Down Expand Up @@ -515,7 +515,7 @@ def _time_shift(self, periods, freq=None):
----------
periods : int
Number of periods to shift by.
freq : pandas.DateOffset, pandas.Timedelta, or string
freq : pandas.DateOffset, pandas.Timedelta, or str
Frequency increment to shift by.
"""
if freq is not None:
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/dtypes/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ def maybe_infer_to_datetimelike(value, convert_dates=False):
Parameters
----------
value : np.array / Series / Index / list-like
convert_dates : boolean, default False
convert_dates : bool, default False
if True try really hard to convert dates (such as datetime.date), other
leave inferred dtype 'date' alone
Expand Down Expand Up @@ -1439,7 +1439,7 @@ def maybe_cast_to_integer_array(arr, dtype, copy=False):
The array to cast.
dtype : str, np.dtype
The integer dtype to cast the array to.
copy: boolean, default False
copy: bool, default False
Whether to make a copy of the array before returning.
Returns
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/dtypes/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def ensure_int_or_float(arr: ArrayLike, copy: bool = False) -> np.array:
----------
arr : array-like
The array whose data type we want to enforce.
copy: boolean
copy: bool
Whether to copy the original array or reuse
it in place, if possible.
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/dtypes/concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ def union_categoricals(to_union, sort_categories=False, ignore_order=False):
----------
to_union : list-like of Categorical, CategoricalIndex,
or Series with dtype='category'
sort_categories : boolean, default False
sort_categories : bool, default False
If true, resulting categories will be lexsorted, otherwise
they will be ordered as they appear in the data.
ignore_order : boolean, default False
ignore_order : bool, default False
If true, the ordered attribute of the Categoricals will be ignored.
Results in an unordered categorical.
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/dtypes/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def find(
"""
Parameters
----------
dtype : Type[ExtensionDtype] or string
dtype : Type[ExtensionDtype] or str
Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/dtypes/missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ def na_value_for_dtype(dtype, compat=True):
Parameters
----------
dtype : string / dtype
compat : boolean, default True
compat : bool, default True
Returns
-------
Expand Down