I have:
df = pd.DataFrame(
{
"A": [["a", "b", "c"], ["d"]],
"B": [[1, 2, 3], [4]],
"C": [["abc"], ["def"]]
}
)
A B C
0 [a, b, c] [1, 2, 3] [abc]
1 [d] [4] [def]
My expected output is:
A B C
0 a 1 abc
1 b 2 abc
2 c 3 abc
3 d 4 def
I tried it with
df = df.explode("A")
df = df.explode("B")
But it creates a "combinatoric product" and keep the Index.