Skip to content
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

Make header_style a Property of ExcelFormatter #22758

Closed
WillAyd opened this issue Sep 19, 2018 · 0 comments · Fixed by #22759
Closed

Make header_style a Property of ExcelFormatter #22758

WillAyd opened this issue Sep 19, 2018 · 0 comments · Fixed by #22759
Labels
Code Style Code style, linting, code_checks good first issue IO Excel read_excel, to_excel

Comments

@WillAyd
Copy link
Member

WillAyd commented Sep 19, 2018

Right now the header style of excel exports is defined as global to the pandas/io/formats/excel.py module:

header_style = {"font": {"bold": True},

Because this exists outside of the ExcelFormatter class where it is used it is way more difficult to override the default than it needs to be. If this was moved from global scope to instance scope it would allow users to theoretically subclass the ExcelFormatter and easily define their own style for the header

This could also eliminate the need for any work on #19386

@WillAyd WillAyd added IO Excel read_excel, to_excel Code Style Code style, linting, code_checks labels Sep 19, 2018
@WillAyd WillAyd added this to the Contributions Welcome milestone Sep 19, 2018
@WillAyd WillAyd changed the title Make header_style an Instance Variable of ExcelFormatter Make header_style an Property of ExcelFormatter Sep 19, 2018
@WillAyd WillAyd changed the title Make header_style an Property of ExcelFormatter Make header_style a Property of ExcelFormatter Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks good first issue IO Excel read_excel, to_excel
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant