Write a DataFrame into a csv file in pandas

pandas.to_csv writes a DataFrame into a csv file.

import pandas

csv = pandas.read_csv('a.csv')

print(csv)
#    name  age
# 0  Josh   27
# 1  Kyle   53
# 2   Bob   48

csv.to_csv('b.csv')

b.csv

,name,age
0,Josh,27
1,Kyle,53
2,Bob,48

pandas file

pandas tutorial