I've the following dictionary:
dictA = {'A': [[1, 2, 3], [1, 2, 3], [1, 2, 3]],
'B': [[4, 4, 4], [4, 4, 4],],
'C': [[4, 6, 0]]
}
I want to convert it to a pd.DataFrame(), expecting this:
id ColA ColB ColC
0 1 4 4
1 2 4 6
2 3 4 0
3 1 4
4 2 4
5 3 4
6 1
7 2
8 3
How can I do that? I'm trying
pd.DataFrame(dictAll.items(), columns=['ColA', 'ColB', 'ColC'])
But it obviously doesn't work!
pd.DataFrame.from_dict(dictA)but the arrays on the dict need to be the same length all.