Skip to content

Commit 5a9d054

Browse files
ShaharNavehWillAyd
authored andcommitted
DOC: Fix SS06 formatting errors in Styler docstrings (pandas-dev#29283)
Co-Authored-By: William Ayd <[email protected]>
1 parent 0dc1752 commit 5a9d054

File tree

1 file changed

+21
-16
lines changed

1 file changed

+21
-16
lines changed

pandas/io/formats/style.py

+21-16
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,7 @@ def __deepcopy__(self, memo):
574574
def clear(self):
575575
"""
576576
Reset the styler, removing any previously applied styles.
577+
577578
Returns None.
578579
"""
579580
self.ctx.clear()
@@ -632,8 +633,9 @@ def _apply(self, func, axis=0, subset=None, **kwargs):
632633

633634
def apply(self, func, axis=0, subset=None, **kwargs):
634635
"""
635-
Apply a function column-wise, row-wise, or table-wise,
636-
updating the HTML representation with the result.
636+
Apply a function column-wise, row-wise, or table-wise.
637+
638+
Updates the HTML representation with the result.
637639
638640
Parameters
639641
----------
@@ -691,8 +693,9 @@ def _applymap(self, func, subset=None, **kwargs):
691693

692694
def applymap(self, func, subset=None, **kwargs):
693695
"""
694-
Apply a function elementwise, updating the HTML
695-
representation with the result.
696+
Apply a function elementwise.
697+
698+
Updates the HTML representation with the result.
696699
697700
Parameters
698701
----------
@@ -719,9 +722,10 @@ def applymap(self, func, subset=None, **kwargs):
719722

720723
def where(self, cond, value, other=None, subset=None, **kwargs):
721724
"""
722-
Apply a function elementwise, updating the HTML
723-
representation with a style which is selected in
724-
accordance with the return value of a function.
725+
Apply a function elementwise.
726+
727+
Updates the HTML representation with a style which is
728+
selected in accordance with the return value of a function.
725729
726730
.. versionadded:: 0.21.0
727731
@@ -812,8 +816,9 @@ def export(self):
812816

813817
def use(self, styles):
814818
"""
815-
Set the styles on the current Styler, possibly using styles
816-
from ``Styler.export``.
819+
Set the styles on the current Styler.
820+
821+
Possibly uses styles from ``Styler.export``.
817822
818823
Parameters
819824
----------
@@ -960,10 +965,10 @@ def background_gradient(
960965
text_color_threshold=0.408,
961966
):
962967
"""
963-
Color the background in a gradient according to
964-
the data in each column (optionally row).
968+
Color the background in a gradient style.
965969
966-
Requires matplotlib.
970+
The background color is determined according
971+
to the data in each column (optionally row). Requires matplotlib.
967972
968973
Parameters
969974
----------
@@ -1077,8 +1082,7 @@ def css(rgba):
10771082

10781083
def set_properties(self, subset=None, **kwargs):
10791084
"""
1080-
Convenience method for setting one or more non-data dependent
1081-
properties or each cell.
1085+
Method to set one or more non-data dependent properties or each cell.
10821086
10831087
Parameters
10841088
----------
@@ -1318,8 +1322,9 @@ def _highlight_extrema(data, color="yellow", max_=True):
13181322
@classmethod
13191323
def from_custom_template(cls, searchpath, name):
13201324
"""
1321-
Factory function for creating a subclass of ``Styler``
1322-
with a custom template and Jinja environment.
1325+
Factory function for creating a subclass of ``Styler``.
1326+
1327+
Uses a custom template and Jinja environment.
13231328
13241329
Parameters
13251330
----------

0 commit comments

Comments
 (0)