I have this dataframe with the Text column
| Text | Cleaned Col |
|---|---|
| , , , Apples , , , Hard Work , , | Apples, Hard Work |
| , , , , , , , , Apples , , , , , | Apples |
| Apples , , Watermelon , , , , , , | Apples, Watermelon |
| , , , , , , , , , , , , , , , , , |
I would like to create a column such as Cleaned Col essentially using regex.
I looked at different patterns such as this r'\s*,*([^(a-zA-Z)]*)' but I am not getting the right outcome.