sncosmo / sncosmo

Python library for supernova cosmology

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support pandas dataframe

MickaelRigault opened this issue · comments

Hello guys,

Simple question: is there a plan to support pandas DataFrame in addition to astropy table for the LC data ?
(in realize_lc() and fit_lc() for instance).

Cheers

There is no current plan for this. Would this include switching the default object that is returned from functions? With the increased popularity and usefulness of DataFrames, I do think we should discuss how they should interact with SNCosmo, but I think this would be better as a discussion or a more formal EPS.

Astropy has functions to convert pandas dataframes to/from astropy tables, see https://docs.astropy.org/en/stable/table/pandas.html

You can call e.g. sncosmo.fit_lc(Table.from_pandas(df))

I don't think that this is something that sncosmo needs to explicitly support.