You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Create ColumnAttribute class (or similar) for mixin columns #3518
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_info using it.
It is present but None: use default ColumnAttribute for 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).
Activity
embray commentedon Apr 15, 2015
Jut based on a brief glance, I think the work I did in #3679 might be useful for this.+