I have this dictionary:
{'Francisco Partners': [45000000],
'Bpifrance': [45000000, 15000000,87000000,15000000,...],
...}
I wrote this code to take it, go through each key and taking the max, median and min of the corresponding values (that are arrays)
srs = [["name", "max", "med", "min"]]
for key, value in dct:
srs_row = []
srs_row.append(key)
srs_row.append(max(value))
srs_row.append(median(value))
srs_row.append(min(value))
srs.append(srs_row)
When I run the program, I get this error, pointing to the "for ..." line:
ValueError: too many values to unpack (expected 2)
What does the machine tries to put in "value", if not an array ? Hence, is there a way to unload the values as an array, to iterate through after ?
Best,