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

BUG: Wrong Latex Encoding #20859

Closed
ScientiaEtVeritas opened this Issue Apr 29, 2018 · 0 comments

Comments

Projects
None yet
3 participants
@ScientiaEtVeritas
Contributor

ScientiaEtVeritas commented Apr 29, 2018

Assume a DataFrame df that looks like this:

|      A      | B | ... |
-------------------------
|    a\b\c    | 2 | ... |
|    p\y\c    | 9 | ... |
|    a\d\x    | 4 | ... |

Calling to_latex on this DataFrame returns strings like a\textbackslashb\textbackslashc, what obviously is an error for LaTeX. Expected and correct is a\textbackslash b\textbackslash c.

Tried with current master 0.23.0.dev0+808.gd92d76e.dirty as well as with release 0.22.0.

Using escape=False returns a\b\c what is also an error for LaTeX (but expected).
So there is no way currently to get valid LaTeX code from a DataFrame like this.

ScientiaEtVeritas added a commit to ScientiaEtVeritas/pandas that referenced this issue Apr 29, 2018

ScientiaEtVeritas added a commit to ScientiaEtVeritas/pandas that referenced this issue Apr 29, 2018

ScientiaEtVeritas added a commit to ScientiaEtVeritas/pandas that referenced this issue Apr 29, 2018

ScientiaEtVeritas added a commit to ScientiaEtVeritas/pandas that referenced this issue Apr 29, 2018

@TomAugspurger TomAugspurger added this to the Next Major Release milestone Apr 29, 2018

@jreback jreback modified the milestones: Next Major Release, 0.23.0 Apr 29, 2018

TomAugspurger added a commit that referenced this issue Apr 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment