pandas 0.7.0 documentation

pandas.Series.to_csv

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

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

Parameters :

path : string

File path

nanRep : string, default ‘’

Missing data rep’n

header : boolean, default False

Write out series name

index : boolean, default True

Write row names (index)

index_label : string or sequence, default None

Column label for index column(s) if desired. If None is given, and header and index are True, then the index names are used. A sequence should be given if the DataFrame uses MultiIndex.

mode : Python write mode, default ‘w’

sep : character, default ”,”

Field delimiter for the output file.

encoding : string, optional

a string representing the encoding to use if the contents are non-ascii, for python versions prior to 3