ColumnInfo

class astropy.table.ColumnInfo(bound=False)[source] [edit on github]

Bases: astropy.utils.data_info.BaseColumnInfo

Container for meta information like name, description, format.

This is required when the object is used as a mixin column within a table, but can be used as a general way to store meta information.

Attributes Summary

attrs_from_parent

Methods Summary

new_like(cols, length[, metadata_conflicts, …]) Return a new Column instance which is consistent with the input cols and has length rows.

Attributes Documentation

attrs_from_parent = {'meta', 'description', 'format', 'unit', 'parent_table', 'indices', 'name', 'dtype'}

Methods Documentation

new_like(cols, length, metadata_conflicts='warn', name=None)[source] [edit on github]

Return a new Column instance which is consistent with the input cols and has length rows.

This is intended for creating an empty column object whose elements can be set in-place for table operations like join or vstack.

Parameters:

cols : list

List of input columns

length : int

Length of the output column object

metadata_conflicts : str (‘warn’|’error’|’silent’)

How to handle metadata conflicts

name : str

Output column name

Returns:

col : Column (or subclass)

New instance of this class consistent with cols