Skip to content

PR09 Batch 2 #29396

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 8 commits into from
Nov 4, 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
8 changes: 4 additions & 4 deletions pandas/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ def argmax(self, axis=None, skipna=True, *args, **kwargs):
Parameters
----------
axis : {None}
Dummy argument for consistency with Series
Dummy argument for consistency with Series.
skipna : bool, default True
Returns
Expand All @@ -1096,7 +1096,7 @@ def min(self, axis=None, skipna=True, *args, **kwargs):
Parameters
----------
axis : {None}
Dummy argument for consistency with Series
Dummy argument for consistency with Series.
skipna : bool, default True
Returns
Expand Down Expand Up @@ -1137,7 +1137,7 @@ def argmin(self, axis=None, skipna=True, *args, **kwargs):
Parameters
----------
axis : {None}
Dummy argument for consistency with Series
Dummy argument for consistency with Series.
skipna : bool, default True
Returns
Expand Down Expand Up @@ -1486,7 +1486,7 @@ def memory_usage(self, deep=False):
----------
deep : bool
Introspect the data deeply, interrogate
`object` dtypes for system-level memory consumption
`object` dtypes for system-level memory consumption.
Returns
-------
Expand Down
28 changes: 14 additions & 14 deletions pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ class Index(IndexOpsMixin, PandasObject):
If an actual dtype is provided, we coerce to that dtype if it's safe.
Otherwise, an error will be raised.
copy : bool
Make a copy of input ndarray
Make a copy of input ndarray.
name : object
Name to be stored in the index
Name to be stored in the index.
tupleize_cols : bool (default: True)
When True, attempt to create a MultiIndex if possible
When True, attempt to create a MultiIndex if possible.
See Also
--------
Expand Down Expand Up @@ -791,13 +791,13 @@ def astype(self, dtype, copy=True):
Parameters
----------
indices : list
Indices to be taken
Indices to be taken.
axis : int, optional
The axis over which to select values, always 0.
allow_fill : bool, default True
fill_value : bool, default None
If allow_fill=True and fill_value is not None, indices specified by
-1 is regarded as NA. If Index doesn't hold NA, raise ValueError
-1 is regarded as NA. If Index doesn't hold NA, raise ValueError.
Returns
-------
Expand Down Expand Up @@ -1077,7 +1077,7 @@ def to_native_types(self, slicer=None, **kwargs):
2) quoting : bool or None
Whether or not there are quoted values in `self`
3) date_format : str
The format used to represent date-like values
The format used to represent date-like values.
Returns
-------
Expand Down Expand Up @@ -2001,7 +2001,7 @@ def notna(self):
downcast : dict, default is None
a dict of item->dtype of what to downcast if possible,
or the string 'infer' which will try to downcast to an appropriate
equal type (e.g. float64 to int64 if possible)
equal type (e.g. float64 to int64 if possible).
Returns
-------
Expand Down Expand Up @@ -2056,7 +2056,7 @@ def dropna(self, how="any"):
Parameters
----------
level : int or str, optional, default None
Only return values from specified level (for MultiIndex)
Only return values from specified level (for MultiIndex).
.. versionadded:: 0.23.0
Expand Down Expand Up @@ -3413,7 +3413,7 @@ def _reindex_non_unique(self, target):
return_indexers : bool, default False
sort : bool, default False
Sort the join keys lexicographically in the result Index. If False,
the order of the join keys depends on the join type (how keyword)
the order of the join keys depends on the join type (how keyword).
Returns
-------
Expand Down Expand Up @@ -4923,9 +4923,9 @@ def slice_indexer(self, start=None, end=None, step=None, kind=None):
Parameters
----------
start : label, default None
If None, defaults to the beginning
If None, defaults to the beginning.
end : label, default None
If None, defaults to the end
If None, defaults to the end.
step : int, default None
kind : str, default None
Expand Down Expand Up @@ -5122,11 +5122,11 @@ def slice_locs(self, start=None, end=None, step=None, kind=None):
Parameters
----------
start : label, default None
If None, defaults to the beginning
If None, defaults to the beginning.
end : label, default None
If None, defaults to the end
If None, defaults to the end.
step : int, defaults None
If None, defaults to 1
If None, defaults to 1.
kind : {'ix', 'loc', 'getitem'} or None
Returns
Expand Down
11 changes: 5 additions & 6 deletions pandas/core/indexes/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,19 +737,18 @@ def _set_levels(

def set_levels(self, levels, level=None, inplace=False, verify_integrity=True):
"""
Set new levels on MultiIndex. Defaults to returning
new index.
Set new levels on MultiIndex. Defaults to returning new index.
Parameters
----------
levels : sequence or list of sequence
new level(s) to apply
New level(s) to apply.
level : int, level name, or sequence of int/level names (default None)
level(s) to set (None for all levels)
Level(s) to set (None for all levels).
inplace : bool
if True, mutates in place
If True, mutates in place.
verify_integrity : bool (default True)
if True, checks that levels and codes are compatible
If True, checks that levels and codes are compatible.
Returns
-------
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/indexes/numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ def _union(self, other, sort):
data : array-like (1-dimensional)
dtype : NumPy dtype (default: %(dtype)s)
copy : bool
Make a copy of input ndarray
Make a copy of input ndarray.
name : object
Name to be stored in the index
Name to be stored in the index.
Attributes
----------
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/indexes/range.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class RangeIndex(Int64Index):
stop : int (default: 0)
step : int (default: 1)
name : object, optional
Name to be stored in the index
Name to be stored in the index.
copy : bool, default False
Unused, accepted for homogeneity with other index types.
Expand Down
11 changes: 6 additions & 5 deletions pandas/core/reshape/tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,17 +275,18 @@ def qcut(
duplicates: str = "raise",
):
"""
Quantile-based discretization function. Discretize variable into
equal-sized buckets based on rank or based on sample quantiles. For example
1000 values for 10 quantiles would produce a Categorical object indicating
quantile membership for each data point.
Quantile-based discretization function.
Discretize variable into equal-sized buckets based on rank or based
on sample quantiles. For example 1000 values for 10 quantiles would
produce a Categorical object indicating quantile membership for each data point.
Parameters
----------
x : 1d ndarray or Series
q : int or list-like of int
Number of quantiles. 10 for deciles, 4 for quartiles, etc. Alternately
array of quantiles, e.g. [0, .25, .5, .75, 1.] for quartiles
array of quantiles, e.g. [0, .25, .5, .75, 1.] for quartiles.
labels : array or bool, default None
Used as labels for the resulting bins. Must be of the same length as
the resulting bins. If False, return only integer indicators of the
Expand Down