Skip to content

BUG: styler render trimming does not work with hide_columns #43704

Closed
@attack68

Description

@attack68

  • 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.render.max_columns = 2
df = DataFrame(np.random.randn(1,5))
df.style.hide_columns(df.columns[:2])

Issue Description

The render is empty since the first two columns are looped but hidden, the loop index does not progress passed 2.

This is a similar issue to #43703 but recorded separately since requires different fixes.

Expected Behavior

Render columns 3 and 4 with a trimmed column

Installed Versions

master

Metadata

Metadata

Labels

BugStylerconditional formatting using DataFrame.style

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions