bpd.Series.to_csv

Series.to_csv(path_or_buf=None, index=True)[source]

Write object to a comma-separated values (csv) file.

Parameters:
  • path_or_buf (str or file handle, default None) – File path or object, if None is provided the result is returned as a string.
  • index (bool, default True) – Write row names (index).
Returns:

If path_or_buf is None, returns the resulting csv format as a string. Otherwise returns None.

Return type:

None or str