Remove index column while saving csv in pandas

前端 未结 2 987
执笔经年
执笔经年 2020-12-04 16:14

I\'m trying to create a csv with pandas, but when I export the data to csv it gives me an extra column



        
2条回答
  •  囚心锁ツ
    2020-12-04 16:59

    What you are seeing is the index column. Just set index=False:

    df_csv = df0_fa.to_csv('revenue/data/test.csv',mode = 'w', index=False)
    

提交回复
热议问题