sot / kadi

Chandra commands and events
https://sot.github.io/kadi
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Add `as_table()` method with more flexibility #133

Open taldcroft opened 5 years ago

taldcroft commented 5 years ago

The current .table property on event models has the behavior of silently dropping columns that have missing values. This happens with the NULL values in the database get turned into None, which makes the column get initialized as Object dtype, and subsequently dropped. This happens with manvrs for instance.

https://github.com/sot/kadi/blob/cccaa7795b6dd9c9f10a8adcdea67d6e52b31412/kadi/events/models.py#L298

A new method as_table() could address this by controlling whether the output is a masked table, or warnings are issued, or turning date strings into cxotime mixin columns, etc.