Skip to content

Fix SS06 formatting errors #29263

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 3 commits into from
Oct 29, 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
20 changes: 11 additions & 9 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -5251,8 +5251,7 @@ def swaplevel(self, i=-2, j=-1, axis=0):

def reorder_levels(self, order, axis=0):
"""
Rearrange index levels using input order. May not drop or
duplicate levels.
Rearrange index levels using input order. May not drop or duplicate levels.

Parameters
----------
Expand Down Expand Up @@ -5854,9 +5853,10 @@ def pivot(self, index=None, columns=None, values=None):
_shared_docs[
"pivot_table"
] = """
Create a spreadsheet-style pivot table as a DataFrame. The levels in
the pivot table will be stored in MultiIndex objects (hierarchical
indexes) on the index and columns of the result DataFrame.
Create a spreadsheet-style pivot table as a DataFrame.

The levels in the pivot table will be stored in MultiIndex objects
(hierarchical indexes) on the index and columns of the result DataFrame.

Parameters
----------%s
Expand Down Expand Up @@ -6249,8 +6249,9 @@ def explode(self, column: Union[str, Tuple]) -> "DataFrame":

def unstack(self, level=-1, fill_value=None):
"""
Pivot a level of the (necessarily hierarchical) index labels, returning
a DataFrame having a new level of column labels whose inner-most level
Pivot a level of the (necessarily hierarchical) index labels.

Returns a DataFrame having a new level of column labels whose inner-most level
consists of the pivoted index labels.

If the index is not a MultiIndex, the output will be a Series
Expand Down Expand Up @@ -6312,8 +6313,7 @@ def unstack(self, level=-1, fill_value=None):
_shared_docs[
"melt"
] = """
Unpivot a DataFrame from wide format to long format, optionally
leaving identifier variables set.
Unpivot a DataFrame from wide to long format, optionally leaving identifiers set.

This function is useful to massage a DataFrame into a format where one
or more columns are identifier variables (`id_vars`), while all other
Expand Down Expand Up @@ -7908,6 +7908,7 @@ def nunique(self, axis=0, dropna=True):
def idxmin(self, axis=0, skipna=True):
"""
Return index of first occurrence of minimum over requested axis.

NA/null values are excluded.

Parameters
Expand Down Expand Up @@ -7945,6 +7946,7 @@ def idxmin(self, axis=0, skipna=True):
def idxmax(self, axis=0, skipna=True):
"""
Return index of first occurrence of maximum over requested axis.

NA/null values are excluded.

Parameters
Expand Down
14 changes: 6 additions & 8 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4353,8 +4353,9 @@ def sort_index(

def reindex(self, *args, **kwargs):
"""
Conform %(klass)s to new index with optional filling logic, placing
NA/NaN in locations having no value in the previous index. A new object
Conform %(klass)s to new index with optional filling logic.

Places NA/NaN in locations having no value in the previous index. A new object
is produced unless the new index is equivalent to the current one and
``copy=False``.

Expand Down Expand Up @@ -4669,8 +4670,7 @@ def _reindex_with_indexers(

def filter(self, items=None, like=None, regex=None, axis=None):
"""
Subset rows or columns of dataframe according to labels in
the specified index.
Subset the dataframe rows or columns according to the specified index labels.

Note that this routine does not filter a dataframe on its
contents. The filter is applied to the labels of the index.
Expand Down Expand Up @@ -8497,8 +8497,7 @@ def resample(

def first(self, offset):
"""
Convenience method for subsetting initial periods of time series data
based on a date offset.
Method to subset initial periods of time series data based on a date offset.

Parameters
----------
Expand Down Expand Up @@ -8560,8 +8559,7 @@ def first(self, offset):

def last(self, offset):
"""
Convenience method for subsetting final periods of time series data
based on a date offset.
Method to subset final periods of time series data based on a date offset.

Parameters
----------
Expand Down