df = pd.DataFrame({'a':[None,1, 2], 'b':[None, (1,2), (3,4)]})
a b
0 NaN None
1 1.0 (1, 2)
2 2.0 (3, 4)
I want to set the tuple in the column be to each have their own column. However, I have an issue with my approach
df[['b1', 'b2']] = pd.DataFrame(df['b'].tolist(), index=df.index)
ValueError: Columns must be same length as key
I tried to fillna will an empty tuple, but it won't take a tuple. How can I make this work?