ColumnInfo#

class astropy.table.ColumnInfo(bound=False)[源代码]#

基类:BaseColumnInfo

用于存储诸如名称、描述、格式等元信息的容器。

当对象用作表中的mixin列时,这是必需的,但也可以作为存储元信息的通用方法。

属性摘要

attr_names 

attrs_from_parent 

description 

dtype 

format 

groups 

indices 

meta 

name 

parent_table 

unit 

方法总结

get_sortable_arrays \()

返回一个数组列表,这些数组可以按字典排序以表示父列的顺序。

new_like(cols, length[, metadata_conflicts, ...])

返回与输入一致的新列实例 cols 并已 length 排好了。

属性文档

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

方法文件

get_sortable_arrays()[源代码]#

返回一个数组列表,这些数组可以按字典排序以表示父列的顺序。

对于列,这只是列本身。

返回:
arrays : listndarrayPython:ndarray列表
new_like(cols, length, metadata_conflicts='warn', name=None)[源代码]#

返回与输入一致的新列实例 cols 并已 length 排好了。

这是为了创建一个空列对象,该对象的元素可以针对表操作(如JOIN或vSTACK)进行就地设置。

参数:
cols : listPython :列表

输入列的列表

length : intPython :整型

输出列对象的长度

metadata_conflicts : str (‘Warn’|‘Error’|‘Silent’)PYTHON:STR(‘Warn’|‘Error’|‘Silent’)

如何处理元数据冲突

name : strPython :字符串

输出列名

返回:
col : Column (或子类)列(或子类)

此类的新实例与 cols