-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Multilevel indexing with .to_latex() method merges two index columns #2924
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
PS sorry definitely wrong place for this, but any idea on where to find documentation on .to_latex method. Only info I can find is in docstring and can't figure out how to use it to format numbers and alignments. considering regexes, but I have feeling the functionality is already there, just cant figure it out. |
You might be looking for http://pandas.pydata.org/pandas-docs/dev/io.html?highlight=formatters#writing-a-formatted-string |
had look at the formatters can' t figure it out Tried: |
round() calls round and puts the result as the formatter, not what you want. |
thanks.. any suggestions for currency formatting... no need for symbol, but thousand separators will make it much more readable. Also is there a way to change the default c of the to_latex method to r. can manualy munge the latex output, but I suspect there is already a builtin way of doing this. |
I think python .format() style string formatting does thousands. |
tried: |
c makes column centre justified, can use l or r to to left and right. numbers more readable if r justified. that is an easy fix though. |
got it figured formatter needs string return |
Got split up here for a while... will close this one an re-add the issue with to_latex method on multi indexed frames on its own |
using Release 0.10.1
using the .to_latex method on a multilevel frame (specifically using a pivot_table) merges the two index columns so that it does not render correctly in latex. Looks like it is missing the & for blank cells in index. and also an & for the columns. Manually inserted those in output and it fixes problem
The text was updated successfully, but these errors were encountered: