Tried a code for having a table in output but the table is not organized enough
This is the code that I used for having an output table:
import tabulate
from tabulate import tabulate
data = [[1, 'Zero', "%0.4f" % stdvzero3, "%0.4f" % stdavgzero3],
[2,'Std A', "%0.3f" % stdva3, "%0.3f" % stdavga3],
[3,'Std B', "%0.3f" % stdvb3, "%0.3f" % stdavgb3],
[4,'Std C', "%0.3f" % stdvc3, "%0.3f" % stdavgc3],
[5,'Std D', "%0.3f" % stdvd3, "%0.3f" % stdavgd3],
[6,'Std E', "%0.3f" % stdve3, "%0.3f" % stdavge3 ],
[7,'Std F', "%0.3f" % stdvf3, "%0.3f" % stdavgf3]],
print (tabulate(data, headers=["No", "Type", "STD_N2O", "Mean_N2O"], tablefmt='simple'))
and this is the table that I got. Can you please let me know how to make it in line and tidy ?
No Type STD_N2O Mean_N2O
--------------------------------- --------------------------------- ----------------------------------- --------------------------------- ----------------------------------- ----------------------------------- -----------------------------------
[1, 'Zero', '0.1027', '387.4733'] [2, 'Std A', '27.756', '546.123'] [3, 'Std B', '173.254', '4608.491'] [4, 'Std C', '52.377', '847.775'] [5, 'Std D', '170.961', '1623.217'] [6, 'Std E', '491.289', '2938.067'] [7, 'Std F', '173.254', '4608.491']