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:
namestr

The name of the column.

datatypestr

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

subtypestr or None, optional

The subtype of the column, if applicable.

unitstr or None, optional

The unit of the column values, if specified.

descriptionstr or None, optional

A description of the column.

formatstr or None, optional

The format string for the column values.

metadict or None, optional

Additional metadata associated with the column.

Attributes:
csv_np_typestr

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.

shapetuple of 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#