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.

outputstr or os.PathLike or file-like object object

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

enginestr, 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.

**kwargsdict, 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.