Skip to content

Commit 531d20b

Browse files
profwackoproost
authored andcommitted
Fix SS06 formatting errors (pandas-dev#29255)
1 parent 1483293 commit 531d20b

File tree

5 files changed

+20
-15
lines changed

5 files changed

+20
-15
lines changed

pandas/core/arrays/sparse/accessor.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,7 @@ def to_coo(self):
308308
@property
309309
def density(self) -> float:
310310
"""
311-
Ratio of non-sparse points to total (dense) data points
312-
represented in the DataFrame.
311+
Ratio of non-sparse points to total (dense) data points.
313312
"""
314313
return np.mean([column.array.density for _, column in self._parent.items()])
315314

pandas/core/frame.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -814,8 +814,10 @@ def to_string(
814814
@property
815815
def style(self):
816816
"""
817-
Property returning a Styler object containing methods for
818-
building a styled HTML representation fo the DataFrame.
817+
Returns a Styler object.
818+
819+
Contains methods for building a styled HTML representation of the DataFrame.
820+
a styled HTML representation fo the DataFrame.
819821
820822
See Also
821823
--------
@@ -8207,6 +8209,8 @@ def to_timestamp(self, freq=None, how="start", axis=0, copy=True):
82078209

82088210
def to_period(self, freq=None, axis=0, copy=True):
82098211
"""
8212+
Convert DataFrame from DatetimeIndex to PeriodIndex.
8213+
82108214
Convert DataFrame from DatetimeIndex to PeriodIndex with desired
82118215
frequency (inferred from index if not passed).
82128216

pandas/core/generic.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -5766,8 +5766,7 @@ def ftypes(self):
57665766

57675767
def as_blocks(self, copy=True):
57685768
"""
5769-
Convert the frame to a dict of dtype -> Constructor Types that each has
5770-
a homogeneous dtype.
5769+
Convert the frame to a dict of dtype -> Constructor Types.
57715770
57725771
.. deprecated:: 0.21.0
57735772
@@ -9428,9 +9427,10 @@ def shift(self, periods=1, freq=None, axis=0, fill_value=None):
94289427

94299428
def slice_shift(self, periods=1, axis=0):
94309429
"""
9431-
Equivalent to `shift` without copying data. The shifted data will
9432-
not include the dropped periods and the shifted axis will be smaller
9433-
than the original.
9430+
Equivalent to `shift` without copying data.
9431+
9432+
The shifted data will not include the dropped periods and the
9433+
shifted axis will be smaller than the original.
94349434
94359435
Parameters
94369436
----------
@@ -10739,10 +10739,11 @@ def nanptp(values, axis=0, skipna=True):
1073910739
name,
1074010740
name2,
1074110741
axis_descr,
10742-
"""Return the difference between the maximum value and the
10742+
"""Return the difference between the min and max value.
10743+
\n.. deprecated:: 0.24.0 Use numpy.ptp instead
10744+
\nReturn the difference between the maximum value and the
1074310745
minimum value in the object. This is the equivalent of the
10744-
``numpy.ndarray`` method ``ptp``.\n\n.. deprecated:: 0.24.0
10745-
Use numpy.ptp instead""",
10746+
``numpy.ndarray`` method ``ptp``.""",
1074610747
nanptp,
1074710748
)
1074810749

pandas/core/indexing.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1291,8 +1291,7 @@ def _get_slice_axis(self, slice_obj: slice, axis: int):
12911291

12921292
class _IXIndexer(_NDFrameIndexer):
12931293
"""
1294-
A primarily label-location based indexer, with integer position
1295-
fallback.
1294+
A primarily label-location based indexer, with integer position fallback.
12961295
12971296
Warning: Starting in 0.20.0, the .ix indexer is deprecated, in
12981297
favor of the more strict .iloc and .loc indexers.

pandas/plotting/_core.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,9 @@ def boxplot_frame_groupby(
496496

497497
class PlotAccessor(PandasObject):
498498
"""
499-
Make plots of Series or DataFrame using the backend specified by the
499+
Make plots of Series or DataFrame.
500+
501+
Uses the backend specified by the
500502
option ``plotting.backend``. By default, matplotlib is used.
501503
502504
Parameters

0 commit comments

Comments
 (0)