Skip to content

DOC: update references to deprecated methods #45159

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 1 commit into from
Jan 2, 2022
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
16 changes: 8 additions & 8 deletions pandas/io/formats/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,8 @@ def to_latex(
**Formatting**

To format values :meth:`Styler.format` should be used prior to calling
`Styler.to_latex`, as well as other methods such as :meth:`Styler.hide_index`
or :meth:`Styler.hide_columns`, for example:
`Styler.to_latex`, as well as other methods such as :meth:`Styler.hide`
for example:

>>> s.clear()
>>> s.table_styles = []
Expand Down Expand Up @@ -1106,7 +1106,7 @@ def set_td_classes(self, classes: DataFrame) -> Styler:
>>> df = pd.DataFrame([[1]])
>>> css = pd.DataFrame([["other-class"]])
>>> s = Styler(df, uuid="_", cell_ids=False).set_td_classes(css)
>>> s.hide_index().to_html() # doctest: +SKIP
>>> s.hide(axis=0).to_html() # doctest: +SKIP
'<style type="text/css"></style>'
'<table id="T__">'
' <thead>'
Expand Down Expand Up @@ -1809,7 +1809,7 @@ def export(self) -> dict[str, Any]:

>>> styler = DataFrame([[1, 2], [3, 4]]).style
>>> styler2 = DataFrame([[9, 9, 9]]).style
>>> styler.hide_index().highlight_max(axis=1) # doctest: +SKIP
>>> styler.hide(axis=0).highlight_max(axis=1) # doctest: +SKIP
>>> export = styler.export()
>>> styler2.use(export) # doctest: +SKIP
"""
Expand Down Expand Up @@ -1861,7 +1861,7 @@ def use(self, styles: dict[str, Any]) -> Styler:

>>> styler = DataFrame([[1, 2], [3, 4]]).style
>>> styler2 = DataFrame([[9, 9, 9]]).style
>>> styler.hide_index().highlight_max(axis=1) # doctest: +SKIP
>>> styler.hide(axis=0).highlight_max(axis=1) # doctest: +SKIP
>>> export = styler.export()
>>> styler2.use(export) # doctest: +SKIP
"""
Expand Down Expand Up @@ -1970,8 +1970,8 @@ def set_sticky(
This method uses the CSS 'position: sticky;' property to display. It is
designed to work with visible axes, therefore both:

- `styler.set_sticky(axis="index").hide_index()`
- `styler.set_sticky(axis="columns").hide_columns()`
- `styler.set_sticky(axis="index").hide(axis="index")`
- `styler.set_sticky(axis="columns").hide(axis="columns")`

may produce strange behaviour due to CSS controls with missing elements.
"""
Expand Down Expand Up @@ -2265,7 +2265,7 @@ def hide_index(
.. versionchanged:: 1.3.0

.. deprecated:: 1.4.0
This method should be replaced by ``hide(axis="columns", **kwargs)``
This method should be replaced by ``hide(axis="index", **kwargs)``

Parameters
----------
Expand Down