-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: DataFrame does not display as LaTeX in Jupyter when it should #39911
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
Comments
In case anyone else runs into this problem, I am currently working around it with this:
If it's stupid and it works... |
Should Pandas instead return a mime bundle with one or more representations of the table?
From https://news.ycombinator.com/item?id=25923123 :
|
Possible MIME types:
Which of these formats does pandas produce now?
|
I looked into MIME bundles recently as part of the PR above. One concern was performance. If Styler is processing a large DataFrame which may take a few seconds for HTML this may take longer for LaTeX and more for other types. |
We are working toward implementing the Styler version of |
[ X] I have checked that this issue has not already been reported.
[ X] I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
If you run the following in a Jupyter cell:
The result is the HTML repr, as usual. But if you select a column, the Series shows the LaTeX repr, as it should.
But
DataFrame
has_repr_latex_
, because this works:So it seems like DataFrame is ignoring the
display.latex.repr
option.Problem description
When
display.latex.repr
is True, DataFrames should get represented in LaTeX, not HTML.Expected Output
Output of
pd.show_versions()
pandas : 1.2.2
numpy : 1.19.2
pytz : 2021.1
dateutil : 2.8.1
pip : 21.0.1
setuptools : 52.0.0.post20210125
Cython : None
pytest : 6.2.2
hypothesis : None
sphinx : 3.4.3
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.6.2
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.3
IPython : 7.20.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.3.4
numexpr : 2.7.2
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.6.0
sqlalchemy : 1.3.23
tables : 3.6.1
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: