Skip to content

BUG: Styler hide compatible with max_columns #44272

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 10 commits into from
Nov 5, 2021

Conversation

attack68
Copy link
Contributor

@attack68 attack68 commented Nov 1, 2021

closes #43704

Description of render trimming and maximums bug:

pd.options.styler.render.max_columns = 5
pd.options.styler.render.max_rows = 5
df = DataFrame(np.random.rand(10,10))
df.columns = pd.MultiIndex.from_product([[0,1,2,3,4], [0,1]])
df.index = pd.MultiIndex.from_product([[0,1,2,3,4], [0,1]])
df.index.names, df.columns.names = ["a", "b"], ["c", "d"]
df.style.hide([(0,0), (0,1), (1,0)], axis=1).hide([(0,0), (0,1), (1,0)], axis=0)

Pre #44248

Screen Shot 2021-11-01 at 19 02 48

After #44248 (merged)

Screen Shot 2021-11-01 at 19 03 47

After this PR

Screen Shot 2021-11-01 at 19 05 04

@attack68 attack68 changed the title WIP BUG: Styler hide compatible with max_columns BUG: Styler hide compatible with max_columns Nov 2, 2021
@attack68 attack68 marked this pull request as ready for review November 2, 2021 19:05
@jreback jreback added Bug Styler conditional formatting using DataFrame.style labels Nov 5, 2021
@jreback jreback added this to the 1.4 milestone Nov 5, 2021
@jreback jreback merged commit 025f892 into pandas-dev:master Nov 5, 2021
@jreback
Copy link
Contributor

jreback commented Nov 5, 2021

thanks @attack68

@attack68 attack68 deleted the styler_trim_columns branch November 5, 2021 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Styler conditional formatting using DataFrame.style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: styler render trimming does not work with hide_columns
2 participants