-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Styling of column and row headers not reflected when saving to excel. #25185
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
Comments
I was unaware that our Excel IO functionality could even support that level of formatting (or styling) for |
This is somewhat related to #22773 So right now there's not a great API to do this. This is controlled internally by the pandas/pandas/io/formats/excel.py Line 385 in 683c7b5
That's not part of the exposed API, nor is it an exposed attribute of the Styler object as that instantiates it locally: pandas/pandas/io/formats/style.py Line 179 in 683c7b5
So one option is to figure out a way to logically expose that, though I'm not sure if that would really jive with the HTML elements that you are styling above. In any case investigation and PRs would certainly be welcome |
closed as recorded in master tracker #42276 |
Following is the code I used to style the headers of both rows and columns and then saving the stylized data frame to an excel file.
Problem description
I am trying to stylize the headers of a data frame and then save that data frame to an excel file, but I am unable to see the stylized effects inside the excel file.
Output of Jupyter Notebook
Output in excel file
Expected Output
Pandas Version: '0.24.1'
The text was updated successfully, but these errors were encountered: