You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you call DataFrame.to_csv with index=False and a header, the header doesn't replace the column names. With index=True, header correctly replaces the csv header.
Using PANDAS 0.13.1.
If you call
DataFrame.to_csv
withindex=False
and aheader
, the header doesn't replace the column names. Withindex=True
,header
correctly replaces the csv header.The code behind this: https://github.com/pydata/pandas/blob/master/pandas/core/format.py#L1080
Presumably we want to replace
cols
withheaders
even in theelse
on line 1091.Happy to take a stab at fixing this, but didn't know if I'm missing some interaction between the variables that makes this not a bug. Thanks!
The text was updated successfully, but these errors were encountered: