Skip to content

Commit 6da08eb

Browse files
staticdevattack68
andauthored
REF: Enhance consistency on Styler methods (#45780)
* Enhance consistency on Styler hide methods * Docs and checks * Make set_sticky consistent with all other methods * Remove whatsnew * Apply suggestions from code review Co-authored-by: JHM Darbyshire <[email protected]> Co-authored-by: JHM Darbyshire <[email protected]>
1 parent 55d1aca commit 6da08eb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/io/formats/style.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -2598,11 +2598,11 @@ def hide_index(
25982598
Styler.hide: Hide the entire index / columns, or specific rows / columns.
25992599
"""
26002600
warnings.warn(
2601-
"this method is deprecated in favour of `Styler.hide(axis='index')`",
2601+
'this method is deprecated in favour of `Styler.hide(axis="index")`',
26022602
FutureWarning,
26032603
stacklevel=find_stack_level(),
26042604
)
2605-
return self.hide(axis=0, level=level, subset=subset, names=names)
2605+
return self.hide(axis="index", level=level, subset=subset, names=names)
26062606

26072607
def hide_columns(
26082608
self,
@@ -2651,11 +2651,11 @@ def hide_columns(
26512651
Styler.hide: Hide the entire index / columns, or specific rows / columns.
26522652
"""
26532653
warnings.warn(
2654-
"this method is deprecated in favour of `Styler.hide(axis='columns')`",
2654+
'this method is deprecated in favour of `Styler.hide(axis="columns")`',
26552655
FutureWarning,
26562656
stacklevel=find_stack_level(),
26572657
)
2658-
return self.hide(axis=1, level=level, subset=subset, names=names)
2658+
return self.hide(axis="columns", level=level, subset=subset, names=names)
26592659

26602660
def hide(
26612661
self,

0 commit comments

Comments
 (0)