How to set to the column list with the number of elements equal to the number of elements in the list on another column Here is the df
t1 t2
[1,2] NaN
[1] NaN
[1,2,3]NaN
I want to get
t1 t2
[1,2] [0,0]
[1] [0]
[1,2,3][0,0,0]
Here is my code
df_1['t2'][df_1['t2'].isnull() & df_1['t1'].notnull()] = [0 for i in df_1['t1']]
But it somehow doesn't return lists, only integer number