astropy.table
基类:BaseGroups
BaseGroups
属性摘要
indices
keys
方法总结
aggregate \(函数)
aggregate
filter \(函数)
filter
基于求值函数筛选列中的组 func 在每个分组子表上。
func
属性文档
方法文件
传递给此方法的函数必须接受一个参数:
column : Column 对象
column
Column
然后它也必须返回 True 或 False . 作为一个示例,下面将选择只有正值的所有列组:
True
False
def all_positive(column): if np.any(column < 0): return False return True
过滤函数
具有聚合行的新列。
ColumnGroups
ColumnGroups.indices
ColumnGroups.keys
ColumnGroups.aggregate()
ColumnGroups.filter()