0

If I have a BinTableHDU object which has several rows & columns, how can I delete a row?

from astropy.io import fits
import numpy as np

simpleArray = np.zeros((3,1),dtype=np.float64)

binTableHDU = fits.BinTableHDU.from_columns([fits.column(format='D', name='Col1', unit='Seconds', array=simpleArray), fits.column(format='D', name='Col1', unit='Seconds', array=simpleArray)])
user3731622
  • 4,844
  • 8
  • 45
  • 84
  • 1
    If you want to manipulate tables please consider using the high-level Table API instead: http://docs.astropy.org/en/stable/table/modify_table.html The lower-level FITS objects are not useful for table manipulation. You can still write the table out to FITS in the end if you really want FITS. – Iguananaut May 04 '19 at 12:17
  • See also https://stackoverflow.com/questions/40785250/astropy-fits-how-to-write-out-a-table-with-rows-sliced-out – Iguananaut May 04 '19 at 12:19

0 Answers0