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: Number formatting support for excel styles #22015

Merged
merged 2 commits into from Jul 24, 2018

Conversation

Projects
None yet
4 participants
@marknsikora
Copy link
Contributor

commented Jul 21, 2018

  • closes #22027
  • tests added / passed
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

Add number formatting support to the excel styles using a fake css entry.

number-format: 0%;

Added new tests, updated docs, and manually verified outputs using both excel output engines that support styling.

@marknsikora marknsikora changed the title EHN: Number formatting support for excel styles ENH: Number formatting support for excel styles Jul 21, 2018

@marknsikora marknsikora force-pushed the marknsikora:excel-number-format branch from a1e0788 to b148a28 Jul 21, 2018

@codecov

This comment has been minimized.

Copy link

commented Jul 21, 2018

Codecov Report

Merging #22015 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #22015      +/-   ##
==========================================
+ Coverage      92%      92%   +<.01%     
==========================================
  Files         168      168              
  Lines       50603    50605       +2     
==========================================
+ Hits        46555    46557       +2     
  Misses       4048     4048
Flag Coverage Δ
#multiple 90.4% <100%> (ø) ⬆️
#single 42.19% <50%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/io/formats/excel.py 97.39% <100%> (+0.01%) ⬆️

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 b975455...4c28407. Read the comment docs.

@WillAyd

This comment has been minimized.

Copy link
Member

commented Jul 22, 2018

Haven't reviewed code in detail yet but does this reference an existing issue? If not can you open and add reference in whatsnew?

@marknsikora marknsikora force-pushed the marknsikora:excel-number-format branch 2 times, most recently from b3d7650 to 901142c Jul 23, 2018

@marknsikora

This comment has been minimized.

Copy link
Contributor Author

commented Jul 23, 2018

Done

@marknsikora marknsikora force-pushed the marknsikora:excel-number-format branch from 901142c to b06cff6 Jul 23, 2018

@WillAyd
Copy link
Member

left a comment

cc @gfyoung for input.

May just be my lack of familiarity with styling but what is the preferred way of using this from an end user perspective? .apply with a UDF? Might be worth adding an example to the style notebook to illustrate

@gfyoung gfyoung added the Enhancement label Jul 24, 2018

@gfyoung

This comment has been minimized.

Copy link
Member

commented Jul 24, 2018

@marknsikora : This looks good at the moment. Could you add whatsnew entry for 0.24.0 ?

@gfyoung gfyoung requested a review from TomAugspurger Jul 24, 2018

@TomAugspurger TomAugspurger merged commit 3e48393 into pandas-dev:master Jul 24, 2018

0 of 3 checks passed

ci/circleci Your tests are queued behind your running builds
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@TomAugspurger

This comment has been minimized.

Copy link
Contributor

commented Jul 24, 2018

Thanks @marknsikora .

@marknsikora marknsikora deleted the marknsikora:excel-number-format branch Jul 24, 2018

alimcmaster1 added a commit to alimcmaster1/pandas that referenced this pull request Aug 12, 2018

ENH: Number formatting support for excel styles (pandas-dev#22015)
* ENH: Number formatting support for excel styles

Sup3rGeo added a commit to Sup3rGeo/pandas that referenced this pull request Oct 1, 2018

ENH: Number formatting support for excel styles (pandas-dev#22015)
* ENH: Number formatting support for excel styles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.