I want to make some comparison of algorithm scores in the table. In my program I have four algorithms, so there are always four rows. I want all of these data in one table.
This is a part of program when user chooses how many points will be considered. In the example below we have 5 points, because user chose 5.
d1 = {1: 1.0, 2: 0.5, 3: 0.25, 4: 0.5, 5: 0.25}
d2 = {1: 0.0, 2: 0.25, 3: 0.25, 4: 0.5, 5: 0.25}
d3 = {1: 0.8333333333333333, 2: 0.0, 3: 0.0, 4: 0.0, 5: 0.0}
d4 = {1: 0.1453355124360636, 2: 0.17621944768308642, 3: 0.17621944768308642, 4: 0.3260061445146773, 5: 0.17621944768308642}
But the user can also choose different number of points which will be considered. So at the beginning we don't know how many columns we will have. Because of this irregularity of size of dictionary, I'm not sure how to create one whole table.
I tried something like that for one of the algorithms:
for row in zip(*([key] + (value) for key, value in sorted(d1.items()))):
print(*row)
but it doesn't working for this one. So as I don't know how to make this for one algorithm, I don't know how to do that for all of them.
Do you have any hints of ideas of solution?
It should be something like that:
