How to find duplicate names using pandas?

前端 未结 6 1273
無奈伤痛
無奈伤痛 2020-12-14 02:27

I have a pandas.DataFrame with a column called name containing strings. I would like to get a list of the names which occur more than once in the c

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-14 02:54

    Another one liner can be:

    (df.name).drop_duplicates()
    

提交回复
热议问题