I have a dataframe in pandas that looks like this:
df = pd.DataFrame([[4, 9],[4,9],[[1,2],[3,4]]], columns=['A', 'B'])
df
A B
0 4 9
1 4 9
2 [1, 2] [3, 4]
However I would like to transform it to a table like this:
A B
0 4 9
1 4 9
2 1 2
3 3 4
Is there a way to apply a row wise function (using df.apply(function,axis=1,...) or some other function in pandas) to do that?