Skip to content

DOC: Fix SS06 formatting errors in Styler docstrings #29283

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 5 commits into from
Oct 31, 2019
Merged
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
37 changes: 21 additions & 16 deletions pandas/io/formats/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ def __deepcopy__(self, memo):
def clear(self):
"""
Reset the styler, removing any previously applied styles.

Returns None.
"""
self.ctx.clear()
Expand Down Expand Up @@ -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
----------
Expand Down Expand Up @@ -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
----------
Expand All @@ -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

Expand Down Expand Up @@ -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
----------
Expand Down Expand Up @@ -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
----------
Expand Down Expand Up @@ -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
----------
Expand Down Expand Up @@ -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
----------
Expand Down