Created
August 10, 2023 21:23
-
-
Save dkirkby/2aea277f61cdec820ef1e461d169ceb6 to your computer and use it in GitHub Desktop.
Create pandas dataframe from FITS table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Need to convert from big-endian to little-endian to avoid this error: | |
# ValueError: Big-endian buffer not supported on little-endian compiler | |
data = fitsio.read(path).byteswap().newbyteorder() | |
df = pd.DataFrame(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment