Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
BUG: to_latex() output broken when the index has a name #10660
Comments
jorisvandenbossche
added the
Output-Formatting
label
Jul 23, 2015
|
Thanks for the report! Can you:
|
jakbaum
commented
Jul 23, 2015
|
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. |
jorisvandenbossche
added the
Bug
label
Jul 23, 2015
|
It seems this has something to do with the index level names:
And possibly related: #9908 |
|
dupe if #2942 ? |
jorisvandenbossche
changed the title from
.groupby().to_latex() output broken to BUG: to_latex() output broken when the index has a name
Jul 23, 2015
|
No, I don't think so, as this one not only applies to multi-index:
So it is something with the index name. |
jakbaum
commented
Jul 23, 2015
|
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 |
jakbaum
commented
Jul 23, 2015
|
@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! |
jorisvandenbossche
added Difficulty Novice Effort Low IO LaTeX and removed Output-Formatting
labels
Aug 20, 2015
taeold
referenced
this issue
Oct 4, 2015
Merged
BUG: to_latex() output broken when the index has a name (GH10660) #11233
jreback
added this to the
0.17.1
milestone
Oct 5, 2015
taeold
added a commit
to taeold/pandas
that referenced
this issue
Oct 5, 2015
|
|
taeold |
f5efd3b
|
jakbaum commentedJul 23, 2015
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()toLaTexusing 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: