write_ecsv#

astropy.io.misc.ecsv.write_ecsv(tbl, output, engine='io.ascii', **kwargs)[source]#

Thin wrapper around the io.ascii ECSV writer to write ECSV files.

Parameters:
tblastropy.table.Table

The table to write to ECSV format.

outputpython:str or os.PathLike or python:file-like object object

The output file path or file-like object to write the ECSV data to.

enginepython:str, optional

The engine to use for writing the CSV data. Default is “io.ascii”, which uses astropy to write the CSV data. Currently this is the only option.

**kwargspython:dict, optional

Additional keyword arguments passed to the ECSV writer. These can include options like delimiter, encoding, and others supported by the astropy.io.ascii.Ecsv writer.