Skip to content

Commit 6c30cbe

Browse files
committed
Merge pull request #11663 from TomAugspurger/doc-fixup-more
DOC: a few touchups
2 parents 02dc09b + 6df97d8 commit 6c30cbe

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

doc/source/api.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1710,7 +1710,7 @@ Style Export and Import
17101710

17111711
Styler.render
17121712
Styler.export
1713-
Styler.set
1713+
Styler.use
17141714

17151715
.. currentmodule:: pandas
17161716

pandas/core/style.py

+13-9
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ class Styler(object):
6868
Notes
6969
-----
7070
Most styling will be done by passing style functions into
71-
Styler.apply or Styler.applymap. Style functions should
72-
return values with strings containing CSS 'attr: value' that will
71+
``Styler.apply`` or ``Styler.applymap``. Style functions should
72+
return values with strings containing CSS ``'attr: value'`` that will
7373
be applied to the indicated cells.
7474
75-
If using in the Jupyter notebook, Styler has defined a _repr_html_
75+
If using in the Jupyter notebook, Styler has defined a ``_repr_html_``
7676
to automatically render itself. Otherwise call Styler.render to get
7777
the genterated HTML.
7878
@@ -306,6 +306,10 @@ def __deepcopy__(self, memo):
306306
return self._copy(deepcopy=True)
307307

308308
def clear(self):
309+
'''
310+
"Reset" the styler, removing any previously applied styles.
311+
Returns None.
312+
'''
309313
self.ctx.clear()
310314
self._todo = []
311315

@@ -360,9 +364,9 @@ def apply(self, func, axis=0, subset=None, **kwargs):
360364
361365
Notes
362366
-----
363-
This is similar to DataFrame.apply, except that axis=None applies
364-
the function to the entire DataFrame at once, rather tha column
365-
or rowwise.
367+
This is similar to ``DataFrame.apply``, except that ``axis=None``
368+
applies the function to the entire DataFrame at once,
369+
rather than column-wise or row-wise.
366370
"""
367371
self._todo.append((lambda instance: getattr(instance, '_apply'),
368372
(func, axis, subset),
@@ -424,7 +428,7 @@ def set_precision(self, precision):
424428
def set_table_attributes(self, attributes):
425429
"""
426430
Set the table attributes. These are the items
427-
that show up in the opening <table> tag in addition
431+
that show up in the opening ``<table>`` tag in addition
428432
to to automatic (by default) id.
429433
430434
.. versionadded:: 0.17.1
@@ -443,7 +447,7 @@ def set_table_attributes(self, attributes):
443447
def export(self):
444448
"""
445449
Export the styles to applied to the current Styler.
446-
Can be applied to a second style with `.use`.
450+
Can be applied to a second style with ``Styler.use``.
447451
448452
.. versionadded:: 0.17.1
449453
@@ -460,7 +464,7 @@ def export(self):
460464
def use(self, styles):
461465
"""
462466
Set the styles on the current Styler, possibly using styles
463-
from `Styler.export`
467+
from ``Styler.export``.
464468
465469
.. versionadded:: 0.17.1
466470

0 commit comments

Comments
 (0)