I have a .fits file that contains data.
I would like to construct a pandas dataframe from this particular file but I don't know how to do it.
data = fits.open('datafile')
No. Name Type Cards Dimensions Format
0 PRIMARY PrimaryHDU 6 (12, 250000) float64
According to what you have in your question and the astropy docs (http://docs.astropy.org/en/stable/io/fits/), it looks like you just need to do:
from astropy.io import fits import pandas data = fits.open('datafile') df = pandas.DataFrame(data.data)