Skip to content

Commit 140b1c2

Browse files
authored
remove references to deprecated methods (#45159)
Co-authored-by: JHM Darbyshire (MBP) <[email protected]>
1 parent 0c59142 commit 140b1c2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pandas/io/formats/style.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -754,8 +754,8 @@ def to_latex(
754754
**Formatting**
755755
756756
To format values :meth:`Styler.format` should be used prior to calling
757-
`Styler.to_latex`, as well as other methods such as :meth:`Styler.hide_index`
758-
or :meth:`Styler.hide_columns`, for example:
757+
`Styler.to_latex`, as well as other methods such as :meth:`Styler.hide`
758+
for example:
759759
760760
>>> s.clear()
761761
>>> s.table_styles = []
@@ -1106,7 +1106,7 @@ def set_td_classes(self, classes: DataFrame) -> Styler:
11061106
>>> df = pd.DataFrame([[1]])
11071107
>>> css = pd.DataFrame([["other-class"]])
11081108
>>> s = Styler(df, uuid="_", cell_ids=False).set_td_classes(css)
1109-
>>> s.hide_index().to_html() # doctest: +SKIP
1109+
>>> s.hide(axis=0).to_html() # doctest: +SKIP
11101110
'<style type="text/css"></style>'
11111111
'<table id="T__">'
11121112
' <thead>'
@@ -1809,7 +1809,7 @@ def export(self) -> dict[str, Any]:
18091809
18101810
>>> styler = DataFrame([[1, 2], [3, 4]]).style
18111811
>>> styler2 = DataFrame([[9, 9, 9]]).style
1812-
>>> styler.hide_index().highlight_max(axis=1) # doctest: +SKIP
1812+
>>> styler.hide(axis=0).highlight_max(axis=1) # doctest: +SKIP
18131813
>>> export = styler.export()
18141814
>>> styler2.use(export) # doctest: +SKIP
18151815
"""
@@ -1861,7 +1861,7 @@ def use(self, styles: dict[str, Any]) -> Styler:
18611861
18621862
>>> styler = DataFrame([[1, 2], [3, 4]]).style
18631863
>>> styler2 = DataFrame([[9, 9, 9]]).style
1864-
>>> styler.hide_index().highlight_max(axis=1) # doctest: +SKIP
1864+
>>> styler.hide(axis=0).highlight_max(axis=1) # doctest: +SKIP
18651865
>>> export = styler.export()
18661866
>>> styler2.use(export) # doctest: +SKIP
18671867
"""
@@ -1970,8 +1970,8 @@ def set_sticky(
19701970
This method uses the CSS 'position: sticky;' property to display. It is
19711971
designed to work with visible axes, therefore both:
19721972
1973-
- `styler.set_sticky(axis="index").hide_index()`
1974-
- `styler.set_sticky(axis="columns").hide_columns()`
1973+
- `styler.set_sticky(axis="index").hide(axis="index")`
1974+
- `styler.set_sticky(axis="columns").hide(axis="columns")`
19751975
19761976
may produce strange behaviour due to CSS controls with missing elements.
19771977
"""
@@ -2265,7 +2265,7 @@ def hide_index(
22652265
.. versionchanged:: 1.3.0
22662266
22672267
.. deprecated:: 1.4.0
2268-
This method should be replaced by ``hide(axis="columns", **kwargs)``
2268+
This method should be replaced by ``hide(axis="index", **kwargs)``
22692269
22702270
Parameters
22712271
----------

0 commit comments

Comments
 (0)