ColumnGroups¶
- class astropy.table.ColumnGroups(parent_column, indices=None, keys=None)[source]¶
Bases:
BaseGroupsAttributes Summary
Methods Summary
aggregate(func)filter(func)Filter groups in the Column based on evaluating function
funcon each group sub-table.Attributes Documentation
- indices¶
- keys¶
Methods Documentation
- filter(func)[source]¶
Filter groups in the Column based on evaluating function
funcon each group sub-table.The function which is passed to this method must accept one argument:
column:Columnobject
It must then return either
TrueorFalse. As an example, the following will select all column groups with only positive values:def all_positive(column): if np.any(column < 0): return False return True