pandas column with list values code example
Example: pandas - unlist values and put in a row
lst_col = 'my_list_var'
r = pd.DataFrame({
col:np.repeat(df[col].values, df[lst_col].str.len())
for col in df.columns.drop(lst_col)}
).assign(**{lst_col:np.concatenate(df[lst_col].values)})[df.columns]
lst_col = 'my_list_var'
lst_col_1 = 'my_list_var_1'
lst_col_2 = 'my_list_var_2'
r = pd.DataFrame({
col:np.repeat(df1[col].values, df1[lst_col].str.len())
for col in df1.columns}
).assign(**{lst_col:np.concatenate(df1[lst_col].values),
lst_col_1:np.concatenate(df1[lst_col_1].values),
lst_col_2:np.concatenate(df1[lst_col_2].values)
})