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
Today I discovered a strange behavior: When I am writing a DataFrame with .to_excel(), it cuts columns. Compared with the same DataFrame with .to_csv() or .head(), you can see the difference, that the last 8 columns are missing.
You can reproduce this by downloading Features.pkl from here and then:
importpandasaspddf=pd.read_pickle('Features.pkl')
df.head() # see the last 8 columns!df.to_excel('Features.xlsx', index=False, header=False)
# see the Excel, you do not have these last 8 columns# in a .to_csv() you have them
Funny part: If you df.ix[:,-71:].to_excel('Features.xlsx', index=False, header=False) you have one of the missing columns. If you do df.ix[:,-70:].to_excel('Features.xlsx', index=False, header=False) you have two and so on...
Today I discovered a strange behavior: When I am writing a DataFrame with
.to_excel()
, it cuts columns. Compared with the same DataFrame with.to_csv()
or.head()
, you can see the difference, that the last 8 columns are missing.You can reproduce this by downloading
Features.pkl
from here and then:Funny part: If you
df.ix[:,-71:].to_excel('Features.xlsx', index=False, header=False)
you have one of the missing columns. If you dodf.ix[:,-70:].to_excel('Features.xlsx', index=False, header=False)
you have two and so on...The text was updated successfully, but these errors were encountered: