Skip to content

BUG: Wrong Latex Encoding #20859

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

Closed
retkowski opened this issue Apr 29, 2018 · 0 comments · Fixed by #20860
Closed

BUG: Wrong Latex Encoding #20859

retkowski opened this issue Apr 29, 2018 · 0 comments · Fixed by #20860
Labels
IO LaTeX to_latex
Milestone

Comments

@retkowski
Copy link
Contributor

retkowski 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.

retkowski added a commit to retkowski/pandas that referenced this issue Apr 29, 2018
retkowski added a commit to retkowski/pandas that referenced this issue Apr 29, 2018
retkowski added a commit to retkowski/pandas that referenced this issue Apr 29, 2018
retkowski added a commit to retkowski/pandas that referenced this issue Apr 29, 2018
@TomAugspurger TomAugspurger added the IO LaTeX to_latex label 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO LaTeX to_latex
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants