I have an input dict-of-string-to-list with possibly different lengths for the list.
d = {'b': [2,3], 'a': [1]}
when I do: df = pd.DataFrame(data=d)
,
i'm seeing ValueError: arrays must all be same length
Question: How do i fill the missing values with default (e.g. 0) when creating the df?
The reason to create the df is to get the final result of:
{'b': 3}
whereas 3
is the max of all numbers in the lists.