ColumnECSV#

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

Bases: object

Class representing attributes of a column in an ECSV header.

Parameters:
namepython:str

The name of the column.

datatypepython:str

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

subtypepython:str or python:None, optional

The subtype of the column, if applicable.

unitpython:str or python:None, optional

The unit of the column values, if specified.

descriptionpython:str or python:None, optional

A description of the column.

formatpython:str or python:None, optional

The format string for the column values.

metapython:dict or python:None, optional

Additional metadata associated with the column.

Attributes:
csv_np_typepython: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.

dtypenumpy.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.

shapepython: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[source]#

Numpy type string describing the column CSV data.

datatype = <dataclasses._MISSING_TYPE object>#
description = None#
dtype[source]#

Numpy dtype in the final column data

format = None#
meta = None#
name = <dataclasses._MISSING_TYPE object>#
shape[source]#

Shape of the column data

subtype = None#
unit = None#