Skip to content
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

chore: remove code for compatibility with pandas <1.4 #149

Merged
merged 1 commit into from
Sep 27, 2023
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
7 changes: 0 additions & 7 deletions edvart/pandas_formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,6 @@ def hide_index(df: pd.DataFrame) -> Styler:
"""
Hides the index of a DataFrame.

The method hide_index is deprecated since 1.4.0, but the method the replaces it
is only available since 1.4.0, therefore we need to conditionally call one or the other
to support both versions and avoid warnings (otherwise we would need to require
python ^3.8, which is required by pandas 1.4.0.)

Parameters
----------
df : pd.DataFrame
Expand All @@ -164,6 +159,4 @@ def hide_index(df: pd.DataFrame) -> Styler:
Styler
Styler object with the index hidden.
"""
if pd.__version__ < "1.4.0":
return df.style.hide_index()
return df.style.hide(axis="index")