Skip to content

BUG: Styler.hide_columns fails when not sparsifying #43464

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

Closed
3 tasks done
attack68 opened this issue Sep 8, 2021 · 1 comment · Fixed by #43465 or #43470
Closed
3 tasks done

BUG: Styler.hide_columns fails when not sparsifying #43464

attack68 opened this issue Sep 8, 2021 · 1 comment · Fixed by #43465 or #43470
Labels
Bug IO HTML read_html, to_html, Styler.apply, Styler.applymap Styler conditional formatting using DataFrame.style
Milestone

Comments

@attack68
Copy link
Contributor

attack68 commented Sep 8, 2021

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the master branch of pandas.

Reproducible Example

pd.options.styler.sparse.columns=False

midx = MultiIndex.from_product([[1, 2],["a", "a", "b"]], names=["zero", "one"])
df = DataFrame(9, index=midx, columns=midx)
styler = df.style.hide_columns((1, "a"))
styler

Issue Description

Screen Shot 2021-09-08 at 20 40 49

Expected Behavior

Columns are hidden in the header row

Installed Versions

Replace this line with the output of pd.show_versions()

@attack68 attack68 added Bug Needs Triage Issue that has not been reviewed by a pandas team member IO HTML read_html, to_html, Styler.apply, Styler.applymap Styler conditional formatting using DataFrame.style and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 8, 2021
@jreback jreback added this to the 1.4 milestone Sep 8, 2021
@attack68
Copy link
Contributor Author

attack68 commented Sep 9, 2021

Actually just noticed the exact same thing for hide_index, should have checked before..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug IO HTML read_html, to_html, Styler.apply, Styler.applymap Styler conditional formatting using DataFrame.style
Projects
None yet
2 participants