删除 pandas 中重复行的语法是什么(所有列都匹配)?

What is the syntax for removing duplicate rows in pandas (where all of the columns match)?

删除 pandas 数据框(所有列都匹配)的重复行的语法是什么?

我尝试使用:

df.drop_duplicates() 但它不起作用。

试试这个

df.drop_duplicates(inplace=True)

你必须添加 inplace= True