-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
REF: Use Styler
implementation for DataFrame.to_latex
#47970
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
mroeschke
merged 28 commits into
pandas-dev:main
from
attack68:to_latex_styler_implement
Jan 19, 2023
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
02d7d0c
Base implementation
attack68 0c12f3a
Base implementation
attack68 d644065
test fix up
attack68 9dcd254
test fix up
attack68 cd05038
test fix up
attack68 c625610
doc change
attack68 493b884
doc change
attack68 41fa426
doc change
attack68 2d5c419
mypy fixes
attack68 c9c61c3
ivanov doc comment
attack68 ab6d3ec
ivanov doc comment
attack68 b913583
rhshadrach reduction
attack68 801bf42
Merge branch 'main' into to_latex_styler_implement
attack68 c803b73
change text from 1.5.0 to 2.0.0
attack68 df0b334
remove argument col_space and add whatsnew
attack68 f4e4bf7
Merge remote-tracking branch 'upstream/main' into to_latex_styler_imp…
attack68 9774341
mroeschke requests
attack68 10b5ec9
mroeschke requests
attack68 2c42a4e
pylint fix
attack68 3c2f964
Merge remote-tracking branch 'upstream/main' into to_latex_styler_imp…
attack68 0b4144a
Whats new text improvements and description added
attack68 fae1b3f
Update doc/source/whatsnew/v2.0.0.rst
attack68 9c7d780
Update doc/source/whatsnew/v2.0.0.rst
attack68 c0bdc6a
remove trailing whitespace
attack68 c740279
remove trailing whitespace
attack68 9b6bba8
Merge remote-tracking branch 'upstream/main' into to_latex_styler_imp…
attack68 6b314cd
Whats new linting fixes
attack68 d6333cb
mroeschke requests
attack68 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Whats new text improvements and description added
- Loading branch information
commit 0b4144aea7b874b7e4a56c4cdb83646986b40a98
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -401,12 +401,13 @@ DataFrame to LaTeX has a new render engine | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
The existing :meth:`DataFrame.to_latex` has been restructured to utilise the | ||
dual implementation previously available under :meth:`.Styler.to_latex`. | ||
extended implementation previously available under :meth:`.Styler.to_latex`. | ||
The arguments signature is similar, albeit ``col_space`` has been removed since | ||
it is ignored by LaTeX engines. This also requires ``jinja2`` as a dependency | ||
which needs to be installed. | ||
The pandas options below are no longer used. The dual, existing, options that | ||
effect the same functionality are indicated below: | ||
it is ignored by LaTeX engines. This render engine also requires ``jinja2`` as a | ||
dependency which needs to be installed, since rendering is based upon jinja2 templates. | ||
|
||
The pandas options below are no longer used and will be removed in future releases. | ||
The alternative options giving similar functionality are indicated below: | ||
- ``display.latex.escape``: replaced with ``styler.format.escape``, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this indentation is causing this docbuild error:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lets see if the pushed change fixes that error |
||
- ``display.latex.longtable``: replaced with ``styler.latex.environment``, | ||
- ``display.latex.multicolumn``, ``display.latex.multicolumn_format`` and | ||
|
@@ -417,10 +418,11 @@ effect the same functionality are indicated below: | |
- ``display.max_rows`` and ``display.max_columns``: replace with | ||
``styler.render.max_rows``, ``styler.render.max_columns`` and | ||
``styler.render.max_elements``. | ||
Note that the behaviour of ``_repr_latex_`` is also affected to display LaTeX | ||
within JupyterNotebooks in operations (not just on nbconvert) when using the | ||
replacement ``repr`` option. | ||
|
||
Note that the behaviour of ``_repr_latex_`` is also changed. Previously | ||
setting ``display.latex.repr`` would generate LaTeX only when using nbconvert for a | ||
JupyterNotebook, and not when the user is running the notebook. Now the | ||
``styler.render.repr`` option allows control of the specific output | ||
within JupyterNotebooks for operations (not just on nbconvert). See :issue:`39911`. | ||
|
||
.. _whatsnew_200.api_breaking.deps: | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sphinx allows underline to be exact or longer than the text so this isn't strictly necessary, but committed anyway.