pandas DataFrame output end of csv

后端 未结 4 2050
死守一世寂寞
死守一世寂寞 2020-11-29 22:18

I wonder how to add new DataFrame data onto the end of an existing csv file? The to_csv doesn\'t mention such functionality.

4条回答
  •  情书的邮戳
    2020-11-29 22:51

    You can also pass the file mode as an argument to the to_csv method

    df.to_csv(file_name, header=False, mode = 'a')
    

提交回复
热议问题