-
-
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
Changes from 1 commit
02d7d0c
0c12f3a
d644065
9dcd254
cd05038
c625610
493b884
41fa426
2d5c419
c9c61c3
ab6d3ec
b913583
801bf42
c803b73
df0b334
f4e4bf7
9774341
10b5ec9
2c42a4e
3c2f964
0b4144a
fae1b3f
9c7d780
c0bdc6a
c740279
9b6bba8
6b314cd
d6333cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -341,6 +341,33 @@ Now, the axes return an empty :class:`RangeIndex`. | |
pd.Series().index | ||
pd.DataFrame().axes | ||
|
||
.. _whatsnew_200.api_breaking.to_latex: | ||
|
||
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`. | ||
mroeschke marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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 | ||
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. Since this is a breaking API change, does it make sense to remove those 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. yes it does. But this PR was large enough that I thought I would try and break it into chunks. Removing the latex options and the LatexFormatter code was intended as an add on. 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. Okay sounds good as a follow up. If/when they are removed it would be good to update this to say |
||
effect the same 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 | ||
``display.latex.multirow``: replaced with ``styler.sparse.rows``, | ||
``styler.sparse.columns``, ``styler.latex.multirow_align`` and | ||
``styler.latex.multicol_align``, | ||
- ``display.latex.repr``: replaced with ``styler.render.repr``, | ||
- ``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 | ||
mroeschke marked this conversation as resolved.
Show resolved
Hide resolved
|
||
within JupyterNotebooks in operations (not just on nbconvert) when using the | ||
replacement ``repr`` option. | ||
|
||
|
||
.. _whatsnew_200.api_breaking.deps: | ||
|
||
Increased minimum versions for dependencies | ||
|
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.