Skip to content

Commit

Permalink
Merge pull request #11663 from TomAugspurger/doc-fixup-more
Browse files Browse the repository at this point in the history
DOC: a few touchups
  • Loading branch information
jreback committed Nov 20, 2015
2 parents 02dc09b + 6df97d8 commit 6c30cbe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion doc/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1710,7 +1710,7 @@ Style Export and Import

Styler.render
Styler.export
Styler.set
Styler.use

.. currentmodule:: pandas

Expand Down
22 changes: 13 additions & 9 deletions pandas/core/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ class Styler(object):
Notes
-----
Most styling will be done by passing style functions into
Styler.apply or Styler.applymap. Style functions should
return values with strings containing CSS 'attr: value' that will
``Styler.apply`` or ``Styler.applymap``. Style functions should
return values with strings containing CSS ``'attr: value'`` that will
be applied to the indicated cells.
If using in the Jupyter notebook, Styler has defined a _repr_html_
If using in the Jupyter notebook, Styler has defined a ``_repr_html_``
to automatically render itself. Otherwise call Styler.render to get
the genterated HTML.
Expand Down Expand Up @@ -306,6 +306,10 @@ def __deepcopy__(self, memo):
return self._copy(deepcopy=True)

def clear(self):
'''
"Reset" the styler, removing any previously applied styles.
Returns None.
'''
self.ctx.clear()
self._todo = []

Expand Down Expand Up @@ -360,9 +364,9 @@ def apply(self, func, axis=0, subset=None, **kwargs):
Notes
-----
This is similar to DataFrame.apply, except that axis=None applies
the function to the entire DataFrame at once, rather tha column
or rowwise.
This is similar to ``DataFrame.apply``, except that ``axis=None``
applies the function to the entire DataFrame at once,
rather than column-wise or row-wise.
"""
self._todo.append((lambda instance: getattr(instance, '_apply'),
(func, axis, subset),
Expand Down Expand Up @@ -424,7 +428,7 @@ def set_precision(self, precision):
def set_table_attributes(self, attributes):
"""
Set the table attributes. These are the items
that show up in the opening <table> tag in addition
that show up in the opening ``<table>`` tag in addition
to to automatic (by default) id.
.. versionadded:: 0.17.1
Expand All @@ -443,7 +447,7 @@ def set_table_attributes(self, attributes):
def export(self):
"""
Export the styles to applied to the current Styler.
Can be applied to a second style with `.use`.
Can be applied to a second style with ``Styler.use``.
.. versionadded:: 0.17.1
Expand All @@ -460,7 +464,7 @@ def export(self):
def use(self, styles):
"""
Set the styles on the current Styler, possibly using styles
from `Styler.export`
from ``Styler.export``.
.. versionadded:: 0.17.1
Expand Down

0 comments on commit 6c30cbe

Please sign in to comment.