0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Pandasでto_csvしたら一行ずつになった件

Posted at

pandasを用いてto_csv関数を用いたら、出力が一行空きになったのでここに備忘録を記す。

開発環境

  • windows10 64bit
  • python 3.8.5
  • pandas 1.1.2(だったけど、1.1.4に変更した。問題の解決には関係なかったけど)

必要な記述は以下の通り


import pandas as pd

pd.to_csv("C://TEST/TEST2//data.csv",line_terminator='\n')

引数line_terminator='\n'を入れたら、丸く収まりましたとさ。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?