Skip to content

ENH: added optional caption and label arguments to DataFrame.to_latex() #25437

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

Merged
merged 27 commits into from
Sep 3, 2019

Conversation

jeschwar
Copy link
Contributor

@jeschwar jeschwar commented Feb 25, 2019

@codecov
Copy link

codecov bot commented Feb 25, 2019

Codecov Report

Merging #25437 into master will increase coverage by <.01%.
The diff coverage is 94.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #25437      +/-   ##
==========================================
+ Coverage   91.74%   91.75%   +<.01%     
==========================================
  Files         173      173              
  Lines       52923    52950      +27     
==========================================
+ Hits        48554    48582      +28     
+ Misses       4369     4368       -1
Flag Coverage Δ
#multiple 90.31% <94.11%> (ø) ⬆️
#single 41.7% <2.94%> (-0.03%) ⬇️
Impacted Files Coverage Δ
pandas/io/formats/format.py 97.99% <100%> (ø) ⬆️
pandas/io/formats/latex.py 100% <100%> (ø) ⬆️
pandas/core/generic.py 94.16% <33.33%> (ø) ⬆️
pandas/util/testing.py 87.66% <0%> (+0.09%) ⬆️

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 85572de...2ce8c67. Read the comment docs.

@codecov
Copy link

codecov bot commented Feb 25, 2019

Codecov Report

Merging #25437 into master will decrease coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #25437      +/-   ##
==========================================
- Coverage   92.04%   91.97%   -0.07%     
==========================================
  Files         180      175       -5     
  Lines       50714    52409    +1695     
==========================================
+ Hits        46679    48204    +1525     
- Misses       4035     4205     +170
Flag Coverage Δ
#multiple 90.53% <100%> (-0.15%) ⬇️
#single 40.68% <0%> (-1.28%) ⬇️
Impacted Files Coverage Δ
pandas/io/formats/format.py 97.91% <100%> (ø) ⬆️
pandas/core/generic.py 93.54% <100%> (-0.67%) ⬇️
pandas/io/formats/latex.py 100% <100%> (ø) ⬆️
pandas/plotting/_misc.py 38.46% <0%> (-26.41%) ⬇️
pandas/io/gbq.py 78.94% <0%> (-21.06%) ⬇️
pandas/io/gcs.py 80% <0%> (-20%) ⬇️
pandas/io/clipboard/clipboards.py 18.98% <0%> (-15.8%) ⬇️
pandas/io/clipboard/__init__.py 39.21% <0%> (-15.14%) ⬇️
pandas/io/s3.py 89.47% <0%> (-10.53%) ⬇️
pandas/core/groupby/base.py 91.83% <0%> (-8.17%) ⬇️
... and 124 more

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 edf5ae8...3eb433b. Read the comment docs.

label=the_label
)

df = DataFrame({'a': [1, 2], 'b': ['b1', 'b2']})
Copy link
Member

@gfyoung gfyoung Feb 25, 2019

Choose a reason for hiding this comment

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

I see multiple tests here in this one that you've written. In the interests of modularity, let's break up into multiple test methods.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem but it would not be consistent with the other test methods in test_to_latex.py; would that be an issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gfyoung no problem but it would not be consistent with the other test methods in test_to_latex.py; would that be an issue?

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

you could have just modified the original PR, will look soon.

@jreback
Copy link
Contributor

jreback commented Feb 27, 2019

cc @syxolk @toobaz @tomneep @shangyian @ScientiaEtVeritas @kdebrab

if any of you would like to comment on this.

Copy link
Contributor

@jreback jreback 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 merge master and update to comments

Copy link
Contributor

@jreback jreback 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 merge master; some comments

Copy link
Contributor

@TomAugspurger TomAugspurger left a comment

Choose a reason for hiding this comment

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

@toobaz do you have a chance to review this again? It seems pretty close to ready.

@TomAugspurger
Copy link
Contributor

Looks like a style issue: https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=15235&view=logs&jobId=435ca956-9126-505f-566f-fff31072e2ba&taskId=e3717827-2a2f-5148-8ad4-7900d2171f6e&lineStart=14&lineEnd=15&colStart=1&colEnd=1

Checking black formatting
would reformat /home/vsts/work/1/s/pandas/io/formats/latex.py
would reformat /home/vsts/work/1/s/pandas/tests/io/formats/test_to_latex.py
All done! 💥 💔 💥
2 files would be reformatted, 858 files would be left unchanged.

Can you run black on those two files?

@WillAyd
Copy link
Member

WillAyd commented Aug 28, 2019

@jeschwar still working this? If so can you merge master and fix up conflicts?

Copy link
Contributor

@TomAugspurger TomAugspurger left a comment

Choose a reason for hiding this comment

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

Small comment on the docstring. Otherwise I think this is good to go.

@TomAugspurger
Copy link
Contributor

Fixed the docstring validation issue. Merging on green.

@TomAugspurger TomAugspurger merged commit bfff080 into pandas-dev:master Sep 3, 2019
@TomAugspurger
Copy link
Contributor

Thanks @jeschwar!

@TomAugspurger TomAugspurger added this to the 1.0 milestone Sep 3, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
…() (pandas-dev#25437)

* ENH: added optional caption and label support to DataFrame.to_latex() (pandas-dev#25436)
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
…() (pandas-dev#25437)

* ENH: added optional caption and label support to DataFrame.to_latex() (pandas-dev#25436)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataFrame.to_latex() does not have LaTeX caption and label support
7 participants