Skip to content

Conversation

@tehunter
Copy link
Contributor

@tehunter tehunter commented Jan 11, 2022

@pep8speaks
Copy link

pep8speaks commented Jan 11, 2022

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.

Copy link
Contributor

@attack68 attack68 left a comment

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

@tehunter
Copy link
Contributor Author

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

@attack68
Copy link
Contributor

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

tehunter and others added 3 commits January 13, 2022 20:25
Co-authored-by: JHM Darbyshire <24256554+attack68@users.noreply.github.com>
@attack68
Copy link
Contributor

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
Copy link
Contributor Author

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:

  • Bug Fix: Fixed bug in CSSToExcelConverter leading to TypeError when border color provided without border style for xlsxwriter engine (GH42276)
  • Enhancement / Styler Enhancements: Added the ability to render border and border-{side} CSS properties in Excel (GH42276)
@jreback
Copy link
Contributor

jreback commented Jan 16, 2022

@tehunter u add them

@jreback jreback added this to the 1.5 milestone Jan 17, 2022
@jreback
Copy link
Contributor

jreback commented Jan 17, 2022

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

tehunter and others added 3 commits January 17, 2022 16:28
Co-authored-by: JHM Darbyshire <24256554+attack68@users.noreply.github.com>
Co-authored-by: JHM Darbyshire <24256554+attack68@users.noreply.github.com>
@tehunter
Copy link
Contributor Author

@github-actions pre-commit

@attack68
Copy link
Contributor

attack68 commented Feb 8, 2022

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

Styler
^^^^^^

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

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

@jreback jreback merged commit 65ecb90 into pandas-dev:main Feb 11, 2022
@jreback
Copy link
Contributor

jreback commented Feb 11, 2022

thanks @tehunter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

IO Excel read_excel, to_excel Styler conditional formatting using DataFrame.style

4 participants