Open fzumstein opened 11 months ago
Thanks for the report, I agree I'd expect not to have a blank row in this case as well (might be a regression). Marking as a bug so we can follow up with the team
If you try the same example on standard jupyter environment, you will see the exact same space allocated. I do not see this as an issue.
That's right, because Jupyter notebooks leave space for a potential columns name, but that concept doesn't really translate to Excel (see e.g., Excel tables).
When showing Values of a DataFrame with a named index, it introduces an empty row between header and data. There's no reason for it though, and
pd.to_excel()
doesn't do it either (even if there's additionally adf.columns.name
!). So currently, you'd have to dodf.reset_index()
to format it correctly.