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

ENH: Making header_style a property of ExcelFormatter #22758 #22759

Merged
merged 5 commits into from
Sep 20, 2018
Merged

ENH: Making header_style a property of ExcelFormatter #22758 #22759

merged 5 commits into from
Sep 20, 2018

Conversation

dannyhyunkim
Copy link
Contributor

@pep8speaks
Copy link

Hello @dannyhyunkim! Thanks for submitting the PR.

@WillAyd
Copy link
Member

WillAyd commented Sep 19, 2018

Nice job! Can you add a whatsnew note for 0.25?

@WillAyd WillAyd added the IO Excel read_excel, to_excel label Sep 19, 2018
@codecov
Copy link

codecov bot commented Sep 19, 2018

Codecov Report

Merging #22759 into master will increase coverage by 0.01%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #22759      +/-   ##
==========================================
+ Coverage   92.16%   92.17%   +0.01%     
==========================================
  Files         169      169              
  Lines       50769    50770       +1     
==========================================
+ Hits        46791    46799       +8     
+ Misses       3978     3971       -7
Flag Coverage Δ
#multiple 90.59% <83.33%> (+0.01%) ⬆️
#single 42.32% <16.66%> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/io/formats/excel.py 97.4% <83.33%> (ø) ⬆️
pandas/core/generic.py 96.67% <0%> (ø) ⬆️
pandas/io/formats/console.py 75.75% <0%> (+10.6%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1a12c41...2f1c6df. Read the comment docs.

@dannyhyunkim
Copy link
Contributor Author

@WillAyd , wasn't entirely sure if this was what you were after, but I had a crack!

@WillAyd
Copy link
Member

WillAyd commented Sep 19, 2018

This is totally my mistake but I meant v0.24 (a whatsnew should already exist).

You did a great job in adding one but unfortunately that’s not what we want here. Sorry!

@dannyhyunkim
Copy link
Contributor Author

No worries at all. I should have clarified earlier.

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

I think this looks good but @gfyoung care to take a look?

@@ -185,6 +185,7 @@ Other Enhancements
- :class:`Resampler` now is iterable like :class:`GroupBy` (:issue:`15314`).
- :meth:`Series.resample` and :meth:`DataFrame.resample` have gained the :meth:`Resampler.quantile` (:issue:`15023`).
- :meth:`Index.to_frame` now supports overriding column name(s) (:issue:`22580`).
- :class:`ExcelFormatter` now has a `header_style` property. Was previously in global scope (:issue:`22758`).
Copy link
Member

Choose a reason for hiding this comment

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

Might not actually need this since the ExcelFormatter isn't part of the exposed API

Copy link
Contributor

Choose a reason for hiding this comment

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

Should it be? If we want to support use-cases like #22758 then it should be. OTOH, I don't think we consider things like HTMLFormatter to be public.

Copy link
Member

Choose a reason for hiding this comment

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

Yea I can see it both ways but was leaning towards no for now just because I don't want this change to make assumptions about our overall strategy with the formatters.

If we want to I'd suggest a separate change that focuses on exposing and documenting the formatters rather than doing it here

Copy link
Contributor

Choose a reason for hiding this comment

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

That sounds right to me. (and there's nothing stopping people from using 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.

Opened #22773 to further that discussion; @dannyhyunkim if you can revert the change to whatsnew would be great as this in its current state is more of an internal refactor. Sorry for the back and forth from me on that!

@gfyoung
Copy link
Member

gfyoung commented Sep 19, 2018

@WillAyd : Thanks for the ping. Will take a look later today.

…s now a property of ExcelFormatter #22758"

This reverts commit 37e187c.
Copy link
Member

@gfyoung gfyoung left a comment

Choose a reason for hiding this comment

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

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm as well

@TomAugspurger TomAugspurger added this to the 0.24.0 milestone Sep 20, 2018
@TomAugspurger TomAugspurger merged commit f8c5705 into pandas-dev:master Sep 20, 2018
@WillAyd
Copy link
Member

WillAyd commented Sep 20, 2018

Thanks @dannyhyunkim - great first contribution!

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make header_style a Property of ExcelFormatter
5 participants