-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: to_latex() output broken when the index has a name #10660
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
Thanks for the report! Can you:
|
Sure. This snippet re-creates the issue. Sorry for the messy DataFrame-construction. First time I create one with numpy.
I don't really know how to test your second point, to be honest. The first 'blank' row of a groupby is just visualization, I reckon? |
Thanks for the reproducible example! That indeeds triggers the error for me as well. Here is an example of just a small dataframe that also shows the error (as it has as such nothing to do with the
It seems that all values are shifted one line below. |
It seems this has something to do with the index level names:
And possibly related: #9908 |
dupe if #2942 ? |
No, I don't think so, as this one not only applies to multi-index:
So it is something with the index name. |
Is the proposed fix of #9908 implemented in 0.16.2? |
@jakbaum yes, it is already in 0.16.1. But it does not fix this one, it possibly fixed a related issue, but should look into more detail into that. And very welcome to look into the problem if you want! It shouldn't be that hard I think. |
also #8336 |
@jorisvandenbossche Your belief in my coding qualities honor me, but quite honestly: I don't think I'm capable of fixing this. I wouldn't even know how to start and I don't want to mess things up. Actually, I'm more of a copy-paste coder than anything else. :) |
@jakbaum no problem, thanks for reporting it anyway! |
Hey folks,
I posted this on SO and was asked to file a report here as well.
I'm trying to export
pandas.DataFrame.describe()
toLaTex
using theto_latex()
-method. This works all fine as long as I don't apply thegroupby()
-method beforehand. With a grouped DataFrame, the first row has no values, even though its label iscount
. Note that the first row of a grouped dataframe is used to mark down the variable used for grouping in iPython notebook.I'm using pandas 0.16.2, python 3.
Is this a bug or am I doing something wrong?
Cheers,
Jakob
Here some examples:
Without
groupby
:With
groupby
:Output in the notebook:
The text was updated successfully, but these errors were encountered: