I have a dataframe which contains array column and string column
| string_col | array_col |
|-------------|----------------------|
| fruits | ['apple', 'banaana'] |
| flowers | ['rose', 'sunflower']|
| animals | ['lion', 'tiger'] |
I want to assign string_col elements to each element in array_col. So, the output dataframe which is in the form of below.
| string_col | array_col | new_col |
|-------------|----------------------|----------------------|
| fruits | ['apple', 'banaana'] |['fruits', 'fruits'] |
| flowers | ['rose', 'sunflower']|['flowers', 'flowers']|
| animals | ['lion', 'tiger'] |['animals', 'animals']|