Skip to main content
`Ctrl`+`K`

# ColumnECSV

class astropy.io.misc.ecsv.ColumnECSV(name, datatype, subtype=None, unit=None, description=None, format=None, meta=None)

  Bases: `object`

  Class representing attributes of a column in an ECSV header.

  Parameters:
    name `python:str`

      The name of the column.

    datatype `python:str`

      The data type of the column as specified in the ECSV header.

    subtype `python:str` or `python:None`, optional

      The subtype of the column, if applicable.

    unit `python:str` or `python:None`, optional

      The unit of the column values, if specified.

    description `python:str` or `python:None`, optional

      A description of the column.

    format `python:str` or `python:None`, optional

      The format string for the column values.

    meta `python:dict` or `python:None`, optional

      Additional metadata associated with the column.

  Attributes:
    csv_np_type `python:str`

      Numpy type string describing the column CSV data. In practice this is the same as the ECSV `datatype` except that “string” => “str”. This is provided to the engine `convert_np_type()` method to generate the engine-specific type provided to the CSV reader. For instance, for pandas the `int32` type gets converted to `Int32` to read columns as a nullable int32.

    dtype `numpy.dtype`

      Numpy dtype in the final column data. This may be entirely different from `csv_np_type` in some cases, in particular JSON-encoded fields.

    shape `python:tuple` of `python:int`

      Shape of the final column data.

  Attributes Summary

  `csv_np_type` | Numpy type string describing the column CSV data.
  `datatype` |
  `description` |
  `dtype` | Numpy dtype in the final column data
  `format` |
  `meta` |
  `name` |
  `shape` | Shape of the column data
  `subtype` |
  `unit` |

  Attributes Documentation

  csv_np_type

    Numpy type string describing the column CSV data.

  datatype = <dataclasses._MISSING_TYPE object>
  description = None
  dtype

    Numpy dtype in the final column data

  format = None
  meta = None
  name = <dataclasses._MISSING_TYPE object>
  shape

    Shape of the column data

  subtype = None
  unit = None