I have a df,
name Value
Sri is a cricketer Sri,is
Ram player Ram
Ravi is a singer is
cricket and foot is ball and,is,foot
and a list,
my_list=["is", "foot"]
I am trying to split df["value"] by (,) and adding the value to a new column if the value exists in my_list. My expected output is
name Value my_list
Sri is a cricketer Sri is
Ram player Ram
Ravi is a singer is
cricket and foot is ball and is,foot
please help to achieve this, thanks in advance