-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
Description
This is mostly a reminder that it would be good to have a ColumnAttribute class for mixin columns, which would allow classes that can be used as Table columns to override some aspects. E.g., Quantity could override __str__ if it were a column such that the unit would not be displayed on every line. Similarly, Time and SkyCoord might define to_pandas methods which do some standard conversion that pandas can deal with (see #3504; a bit trickier would be to make this round-trip... some way to store the class used in the pandas dtype?).
From #3011 (comment), the logic internal to Table might be something like:
- There is an attribute and it is a subclass of
ColumnAttribute[Base]: initialise_col_infousing it. - It is present but
None: use defaultColumnAttributefor initalisation. - It is not present: either try using default, or let user explicitly do it (and take responsibiiity, say with
create_mixin_column(s), which might do some tests and then just set that attribute).