astropy:docs

write

astropy.io.ascii.write(table, output=None, format=None, Writer=None, **kwargs)[source] [edit on github]

Write the input table to filename. Most of the default behavior for various parameters is determined by the Writer class.

Parameters:
  • table – input table (Reader object, NumPy struct array, list of lists, etc)
  • output – output [filename, file-like object] (default = sys.stdout)
  • format – output format (default=``basic``)
  • delimiter – column delimiter string
  • write_comment – string defining a comment line in table
  • quotechar – one-character string to quote fields containing special characters
  • formats – dict of format specifiers or formatting functions
  • strip_whitespace – strip surrounding whitespace from column values (default=True)
  • names – list of names corresponding to each data column
  • include_names – list of names to include in output (default=None selects all names)
  • exclude_names – list of names to exlude from output (applied after include_names)
  • Writer – Writer class (DEPRECATED) (default=``ascii.Basic``)

Page Contents