I have the following table/dataframe in pandas)
+-------------------------------+---------------+
| Col_1 | Col_2 |
+-------------------------------+---------------+
| ['Apple', 'Coffee', 'Banana'] | [Food] |
| ['Apple'] | [Drink] |
| [] | [Clothes] |
| [] | [Food] |
| ['Apple', 'Orange'] | [Food] |
| ['Apple', 'Orange'] | [Stuff, Food] |
+-------------------------------+---------------+
I want a way to copy the value in Col_2 (same row) if and only if len(x) == 0 in Col_1.
Thus the desired result is:
+-------------------------------+---------------+
| Col_1 | Col_2 |
+-------------------------------+---------------+
| ['Apple', 'Coffee', 'Banana'] | [Food] |
| ['Apple'] | [Drink] |
| [Clothes] | [Clothes] |
| [Food] | [Food] |
| ['Apple', 'Orange'] | [Food] |
| ['Apple', 'Orange'] | [Stuff, Food] |
+-------------------------------+---------------+