You can write to csv without the header using header=False
and without the index using index=False
. If desired, you also can modify the separator using sep
.
CSV example with no header row, omitting the header row:
df.to_csv('filename.csv', header=False)
TSV (tab-separated) example, omitting the index column:
df.to_csv('filename.tsv', sep='', index=False)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…