I'm trying to print the output of an astronomy simulation so that it looks nice in my console. I generate 4 numpy arrays called Amplitude, Mass, Period and Eccentricity and I want to put them in a table. The first index of each array are the values for planet 1, the second for planet 2 etc.
So my arrays look like (values are all float numbers, eg 'a1' just a placeholder):
amp = [a1 a2 a3 a4]
mass = [m1 m2 m3 m4]
period = [p1 p2 p3 p4]
ecc = [e1 e2 e3 e4]
I'd like my table to look like:
planet|amp|mass|period|ecc
1 |a1 |m1 |p1 |e1
2 |a2 |m2 |p2 |e2
...
I've tried using tabulate and something like:
print tabulate(['1', amp[0], mass[0], period[0], ecc[0]], headers=[...])
but I get an error of 'numpy.float64' object is not iterable
Any help would be appreciated!