One of the columns in DataFrame is an array. How do I flatten it?
column1 column2 column3
var1 var11 [1, 2, 3, 4]
var2 var22 [1, 2, 3, 4, -2, 12]
var3 var33 [1, 2, 3, 4, 33, 544]
After flattening it should be:
column1 column2 column3
var1 var11 1
var1 var11 2
var1 var11 3
var1 var11 4
var2 var22 1
var2 var22 2
var2 var22 3
var2 var22 4
var2 var22 -2
......
var3 var33 544
I seemed unstack
could help me but I couldn't understand how exactly.