Skip to main content
`Ctrl`+`K`

# CommentedHeader

class astropy.io.ascii.CommentedHeader

  Bases: `Basic`

  Character-delimited table with column names in a comment line.

  When reading, `header_start` can be used to specify the line index of column names, and it can be a negative index (for example -1 for the last commented line). The default delimiter is the <space> character.

  This matches the format produced by `np.savetxt()`, with `delimiter=','`, and `header='<comma-delimited-column-names-list>'`.

  Example:

      # col1 col2 col3
      # Comment line
      1 2 3
      4 5 6

  Methods Summary

  `read`(table) | Read input data (file-like object, filename, list of strings, or single string) into a Table and return the result.
  `write_header`(lines, meta) | Write comment lines after, rather than before, the header.

  Methods Documentation

  read(table)

    Read input data (file-like object, filename, list of strings, or single string) into a Table and return the result.

  write_header(lines, meta)

    Write comment lines after, rather than before, the header.