Closed
Description
This used to work OK in version 0.15 but stopped working in versions 0.16+.
import pandas as pd
df = pd.DataFrame({0: ['a', 'b', 'c'],
1: ['aa', 'bb', 'cc']})
df['test'] = 'txt'
df.to_csv('/home/temp/df.csv', columns=['test', 0, 1])
The following output is produced (values from columns 0 and 1 are missing):
,test,0,1
0,txt,,
1,txt,,
2,txt,,
Replacing 'test' with an integer value or skipping the columns argument works fine.
INSTALLED VERSIONS
commit: None
python: 2.7.9.final.0
python-bits: 64
OS: Linux
OS-release: 2.6.18-238.9.1.el5
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US
pandas: 0.17.0
...