To_latex: incorrect encoding for strings (with backslashes)

I have DataFrame dfone that looks like this:

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

A call to_latexin this DataFramereturns a string of type a\textbackslashb\textbackslashc, which is obviously a mistake for LaTeX.

Are there any options or common coding strategies for this?

Edit: Usage escape=Falsereturns a\b\c, which is also a bug for LaTeX.

+4
source share

Source: https://habr.com/ru/post/1682211/


All Articles