Let's assume I have a fits file with one extension, and the data consists of a table of two columns with 100 elements each
data = pyfits.open('path2myfile')[1].data
head = pyfits.open('path2myfile')[1].header
print data['field1'] # print an array with 100 elements
print data['field2'] # print another array with 100 elements
Now I want to add to my table a new column, let's say data['field3'], which is another array of 100 elements.
How exactly do I do that ?