Skip to content

Fix SS06 formatting errors #29255

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 7 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
3 changes: 1 addition & 2 deletions pandas/core/arrays/sparse/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,7 @@ def to_coo(self):
@property
def density(self) -> float:
"""
Ratio of non-sparse points to total (dense) data points
represented in the DataFrame.
Ratio of non-sparse points to total (dense) data points.
"""
return np.mean([column.array.density for _, column in self._parent.items()])

Expand Down
8 changes: 6 additions & 2 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,8 +814,10 @@ def to_string(
@property
def style(self):
"""
Property returning a Styler object containing methods for
building a styled HTML representation fo the DataFrame.
Returns a Styler object.

Contains methods for building a styled HTML representation of the DataFrame.
a styled HTML representation fo the DataFrame.

See Also
--------
Expand Down Expand Up @@ -8207,6 +8209,8 @@ def to_timestamp(self, freq=None, how="start", axis=0, copy=True):

def to_period(self, freq=None, axis=0, copy=True):
"""
Convert DataFrame from DatetimeIndex to PeriodIndex.

Convert DataFrame from DatetimeIndex to PeriodIndex with desired
frequency (inferred from index if not passed).

Expand Down
17 changes: 9 additions & 8 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -5766,8 +5766,7 @@ def ftypes(self):

def as_blocks(self, copy=True):
"""
Convert the frame to a dict of dtype -> Constructor Types that each has
a homogeneous dtype.
Convert the frame to a dict of dtype -> Constructor Types.

.. deprecated:: 0.21.0

Expand Down Expand Up @@ -9428,9 +9427,10 @@ def shift(self, periods=1, freq=None, axis=0, fill_value=None):

def slice_shift(self, periods=1, axis=0):
"""
Equivalent to `shift` without copying data. The shifted data will
not include the dropped periods and the shifted axis will be smaller
than the original.
Equivalent to `shift` without copying data.

The shifted data will not include the dropped periods and the
shifted axis will be smaller than the original.

Parameters
----------
Expand Down Expand Up @@ -10739,10 +10739,11 @@ def nanptp(values, axis=0, skipna=True):
name,
name2,
axis_descr,
"""Return the difference between the maximum value and the
"""Return the difference between the min and max value.
\n.. deprecated:: 0.24.0 Use numpy.ptp instead
\nReturn the difference between the maximum value and the
minimum value in the object. This is the equivalent of the
``numpy.ndarray`` method ``ptp``.\n\n.. deprecated:: 0.24.0
Use numpy.ptp instead""",
``numpy.ndarray`` method ``ptp``.""",
nanptp,
)

Expand Down
3 changes: 1 addition & 2 deletions pandas/core/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1291,8 +1291,7 @@ def _get_slice_axis(self, slice_obj: slice, axis: int):

class _IXIndexer(_NDFrameIndexer):
"""
A primarily label-location based indexer, with integer position
fallback.
A primarily label-location based indexer, with integer position fallback.

Warning: Starting in 0.20.0, the .ix indexer is deprecated, in
favor of the more strict .iloc and .loc indexers.
Expand Down
4 changes: 3 additions & 1 deletion pandas/plotting/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,9 @@ def boxplot_frame_groupby(

class PlotAccessor(PandasObject):
"""
Make plots of Series or DataFrame using the backend specified by the
Make plots of Series or DataFrame.

Uses the backend specified by the
option ``plotting.backend``. By default, matplotlib is used.

Parameters
Expand Down