Skip to content

BUG: styler index and empty df #43327

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 4 commits into from
Aug 31, 2021

Conversation

attack68
Copy link
Contributor

@attack68 attack68 commented Aug 31, 2021

@alimcmaster1 alimcmaster1 added Styler conditional formatting using DataFrame.style Bug labels Aug 31, 2021
def test_render_empty_mi():
# GH 43305
df = DataFrame(index=MultiIndex.from_product([["A"], [0, 1]], names=[None, "one"]))
df.style.to_html()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth asserting this is as expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not convinced. but I added it anyway. 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - will save any regressions over time.

Copy link
Member

@alimcmaster1 alimcmaster1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Minor Comments

@jreback jreback added this to the 1.4 milestone Aug 31, 2021
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm over to you @alimcmaster1

@alimcmaster1 alimcmaster1 merged commit 2dcaadd into pandas-dev:master Aug 31, 2021
@attack68 attack68 deleted the bug_styler_index branch August 31, 2021 15:45
feefladder pushed a commit to feefladder/pandas that referenced this pull request Sep 7, 2021
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 IndexError when rendering an empty DataFrame
3 participants