LightCurve.to_csv(path_or_buf=None, **kwargs)

Writes the light curve to a CSV file.

This method will convert the light curve into the Comma-Separated Values (CSV) text format. By default this method will return the result as a string, but you can also write the string directly to disk by providing a file name or handle via the path_or_buf parameter.

path_or_bufstring or file handle

File path or object. By default, the result is returned as a string.


Dictionary of arguments to be passed to TimeSeries.write().

csvstr or None

Returns a csv-formatted string if path_or_buf=None. Returns None otherwise.