BUG/ENH: Translate CSS border properties for Styler.to_excel by tehunter · Pull Request #45312 · pandas-dev/pandas (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation34 Commits30 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

tehunter

@pep8speaks

Hello @tehunter! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2022-02-10 13:27:41 UTC

@tehunter

This comment has been minimized.

@tehunter

attack68

attack68

attack68

attack68

Choose a reason for hiding this comment

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

can you also look to add a roundtrip test in pandas/tests/io/excel/test_style.py

attack68

@tehunter

@tehunter

@tehunter

Addressing PR change requests

@tehunter

@tehunter

@tehunter

Any idea what could be causing the failure? It's something related to filesystems in test_arrowparquet_options, which I haven't touched.

attack68

attack68

@attack68

Looking really good, especially the style round trip. Just one or two comments for optimisation.

@tehunter @attack68

Co-authored-by: JHM Darbyshire 24256554+attack68@users.noreply.github.com

@tehunter

@tehunter

@attack68

can you show a test that exerices this at a high level as well

Its difficult to test this since you have to write to excel and then read that the file rendered correctly.

The round trip tests I requested in test_style.py now do this: explicitly they check that:

a) The styled dataframe (with a border) is different to the unstyled dataframe (without border)
b) that the excel file created is read in correctly by openpyxl and has the border styles as expected.

@tehunter

needs a whats new 1.5.0, (maybe 1.4.1 if it can be backported).

Do I write the entry or does a maintainer do that? I propose 2 entries along the lines of:

@jreback

@tehunter

attack68

@jreback

jreback

@jreback

looks fine (but before i resolved i think the doc-build was failing) so let's check that.

@jreback

attack68

attack68

attack68

@tehunter @attack68

Co-authored-by: JHM Darbyshire 24256554+attack68@users.noreply.github.com

@tehunter @attack68

Co-authored-by: JHM Darbyshire 24256554+attack68@users.noreply.github.com

@tehunter

@tehunter

@github-actions pre-commit

@tehunter

@attack68

@tehunter if you get a chance to merge with main, i can take a look at the CI errors you are getting

jreback

Styler
^^^^^^
- Fixed bug in :class:`CSSToExcelConverter` leading to ``TypeError`` when border color provided without border style for ``xlsxwriter`` engine (:issue:`42276`)

Choose a reason for hiding this comment

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

just put this in the I/O section

@tehunter

@jreback

phofl pushed a commit to phofl/pandas that referenced this pull request

Feb 14, 2022

@tehunter @phofl

yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request

Jul 13, 2022

@tehunter @yehoshuadimarsky

Labels

IO Excel

read_excel, to_excel

Styler

conditional formatting using DataFrame.style