FITS table data to pandas dataframe

Lia Corrales 3 years ago • updated by The Astropy Project 3 years ago 2

Something like astropy.io.table.to_pandas(), but for fits data objects


Could you please extend this a bit? It seems to require just one extra step of reading in the fits table as a Table.

from astropy.table import Table

table = Table.read('your_table.fits')

pandas_df = table.to_pandas()


Indeed, any Astropy Table can be easily converted to/from a Pandas DataFrame - see this documentation page for more details!