diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py index abf2caf3914e0..545d6a674411a 100644 --- a/pandas/io/formats/style.py +++ b/pandas/io/formats/style.py @@ -574,6 +574,7 @@ def __deepcopy__(self, memo): def clear(self): """ Reset the styler, removing any previously applied styles. + Returns None. """ self.ctx.clear() @@ -632,8 +633,9 @@ def _apply(self, func, axis=0, subset=None, **kwargs): def apply(self, func, axis=0, subset=None, **kwargs): """ - Apply a function column-wise, row-wise, or table-wise, - updating the HTML representation with the result. + Apply a function column-wise, row-wise, or table-wise. + + Updates the HTML representation with the result. Parameters ---------- @@ -691,8 +693,9 @@ def _applymap(self, func, subset=None, **kwargs): def applymap(self, func, subset=None, **kwargs): """ - Apply a function elementwise, updating the HTML - representation with the result. + Apply a function elementwise. + + Updates the HTML representation with the result. Parameters ---------- @@ -719,9 +722,10 @@ def applymap(self, func, subset=None, **kwargs): def where(self, cond, value, other=None, subset=None, **kwargs): """ - Apply a function elementwise, updating the HTML - representation with a style which is selected in - accordance with the return value of a function. + Apply a function elementwise. + + Updates the HTML representation with a style which is + selected in accordance with the return value of a function. .. versionadded:: 0.21.0 @@ -812,8 +816,9 @@ def export(self): def use(self, styles): """ - Set the styles on the current Styler, possibly using styles - from ``Styler.export``. + Set the styles on the current Styler. + + Possibly uses styles from ``Styler.export``. Parameters ---------- @@ -960,10 +965,10 @@ def background_gradient( text_color_threshold=0.408, ): """ - Color the background in a gradient according to - the data in each column (optionally row). + Color the background in a gradient style. - Requires matplotlib. + The background color is determined according + to the data in each column (optionally row). Requires matplotlib. Parameters ---------- @@ -1077,8 +1082,7 @@ def css(rgba): def set_properties(self, subset=None, **kwargs): """ - Convenience method for setting one or more non-data dependent - properties or each cell. + Method to set one or more non-data dependent properties or each cell. Parameters ---------- @@ -1318,8 +1322,9 @@ def _highlight_extrema(data, color="yellow", max_=True): @classmethod def from_custom_template(cls, searchpath, name): """ - Factory function for creating a subclass of ``Styler`` - with a custom template and Jinja environment. + Factory function for creating a subclass of ``Styler``. + + Uses a custom template and Jinja environment. Parameters ----------