I have a dataframe like this.
df = pd.DataFrame({
"Name" : ["ABC LLC Ram corp", "IJK Inc"],
"id" : [101, 102]
})
Name id
0 ABC LLC Ram corp 101
1 IJK Inc 102
I am trying to split the Name series into multiple rows based on my separator. I am able to split but unable to retain the separators too.
separators = ["inc","corp","llc"]
My expected output is,
Name id
ABC LLC 101
RAM corp 101
IJK Inc 102
Please help, thanks.