Series.to_csv()

pandas.Series.to_csv

Series.to_csv(path, index=True, sep=', ', na_rep='', float_format=None, header=False, index_label=None, mode='w', nanRep=None, encoding=None, date_format=None, decimal='.')

Write Series to a comma-separated values (csv) file

Parameters:

path : string file path or file handle / StringIO. If None is provided

the result is returned as a string.

na_rep : string, default ‘’

Missing data representation

float_format : string, default None

Format string for floating point numbers

header : boolean, default False

Write out series n