I am using tabulate 0.75 to generate LaTeX tables. The function tabulate which generates my tables has a built-in function to format the input. But I want to define the amount of decimals for every column itself. For e.g.
a b
18.12 16
17.47 15
This is the built-in function (floatfmt=".2f") which works perfectly - but it acts on every column the same.
tabulate(tables[i], headers[i], numalign="center", tablefmt="latex_booktabs", floatfmt=".2f")
I am getting my data via
tables = [(list(zip(
unumpy.nominal_values(dt),
unumpy.nominal_values(U),
unumpy.nominal_values(I),
unumpy.nominal_values(E),
unumpy.std_devs(E)))), ............and so on
I am using ufloat for my lists
array123 = ufloat(nominalvalues, errors)
very often because it makes handling with errors pretty easy. Does anyone know a simple way to format?
"{:.2f}".format(unumpy.nominal_values(E))
TypeError: non-empty format string passed to object.__format__
This doesnt work.
Thanks in advance.