write¶
-
astropy.io.ascii.
write
(table, output=None, format=None, Writer=None, fast_writer=True, **kwargs)[source] [edit on github]¶ Write the input
table
tofilename
. Most of the default behavior for various parameters is determined by the Writer class.Parameters: table :
BaseReader
, array_like, str, file_like, listInput table as a Reader object, Numpy struct array, file name, file-like object, list of strings, or single newline-separated string.
output : str, file_like
Output [filename, file-like object] (default =
sys.stdout
)format : str
Output table format (default=
basic
)delimiter : str
Column delimiter string
comment : str
String defining a comment line in table
quotechar : str
One-character string to quote fields containing special characters
formats : dict
Dictionary of format specifiers or formatting functions
strip_whitespace : bool
Strip surrounding whitespace from column values (default=
True
)names : list
List of names corresponding to each data column
include_names : list
List of names to include in output (default=
None
selects all names)exclude_names : list
List of names to exclude from output (applied after
include_names
)fast_writer : bool
Whether to use the fast Cython writer (default=
True
)Writer :
Writer
Writer class (DEPRECATED) (default=
Basic
)