Skip to content

REF: Enhance consistency on Styler methods #45780

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 7 commits into from
Mar 18, 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
8 changes: 4 additions & 4 deletions pandas/io/formats/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -2598,11 +2598,11 @@ def hide_index(
Styler.hide: Hide the entire index / columns, or specific rows / columns.
"""
warnings.warn(
"this method is deprecated in favour of `Styler.hide(axis='index')`",
'this method is deprecated in favour of `Styler.hide(axis="index")`',
FutureWarning,
stacklevel=find_stack_level(),
)
return self.hide(axis=0, level=level, subset=subset, names=names)
return self.hide(axis="index", level=level, subset=subset, names=names)

def hide_columns(
self,
Expand Down Expand Up @@ -2651,11 +2651,11 @@ def hide_columns(
Styler.hide: Hide the entire index / columns, or specific rows / columns.
"""
warnings.warn(
"this method is deprecated in favour of `Styler.hide(axis='columns')`",
'this method is deprecated in favour of `Styler.hide(axis="columns")`',
FutureWarning,
stacklevel=find_stack_level(),
)
return self.hide(axis=1, level=level, subset=subset, names=names)
return self.hide(axis="columns", level=level, subset=subset, names=names)

def hide(
self,
Expand Down