File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -2993,10 +2993,15 @@ def to_latex(
2993
2993
>>> df = pd.DataFrame({'name': ['Raphael', 'Donatello'],
2994
2994
... 'mask': ['red', 'purple'],
2995
2995
... 'weapon': ['sai', 'bo staff']})
2996
- >>> df.to_latex(index=False) # doctest: +NORMALIZE_WHITESPACE
2997
- '\\begin{tabular}{lll}\n\\toprule\n name & mask & weapon
2998
- \\\\\n\\midrule\n Raphael & red & sai \\\\\n Donatello &
2999
- purple & bo staff \\\\\n\\bottomrule\n\\end{tabular}\n'
2996
+ >>> print(df.to_latex(index=False)) # doctest: +NORMALIZE_WHITESPACE
2997
+ \begin{tabular}{lll}
2998
+ \toprule
2999
+ name & mask & weapon \\
3000
+ \midrule
3001
+ Raphael & red & sai \\
3002
+ Donatello & purple & bo staff \\
3003
+ \bottomrule
3004
+ \end{tabular}
3000
3005
"""
3001
3006
# Get defaults from the pandas config
3002
3007
if self .ndim == 1 :
You can’t perform that action at this time.
0 commit comments