human
write to csv from DataFrame python pandas
assistant
Here is some code to write column 'sum' of DataFrame `a` to csv file 'test.csv'

a.to_csv('test.csv', cols=['sum'])

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.