I have a data frame like this:
df:
col1 col2
1 pqr
3 abc
2 pqr
4 xyz
1 pqr
I found that there is duplicate value and its pqr. I want to add 1,2,3 where pqr occurs. The final data frame I want to achieve is:
df1
col1 col2
1 pqr1
3 abc
2 pqr2
4 xyz
1 pqr3
How to do it in efficient way