astropy_to_pandas¶
- lsst.daf.butler.formatters.parquet.astropy_to_pandas(astropy_table: atable.Table, index: str | None = None) pd.DataFrame ¶
Convert an astropy table to a pandas dataframe via arrow.
By going via arrow we avoid pandas masked column bugs (e.g. https://github.com/pandas-dev/pandas/issues/58173)
- Parameters:
- astropy_table
astropy.Table
Input astropy table.
- index
str
, optional Name of column to set as index.
- astropy_table
- Returns:
- dataframe
pandas.DataFrame
Output pandas dataframe.
- dataframe