【发布时间】:2020-09-08 16:59:12
【问题描述】:
我有一个如下的DataFrame:
print(df)
Product Color Weight
0 A Red 13.01
1 A Red 13.04
2 A Red 13.10
3 A Red 13.11
我想删除重复项并仅保存重量为 max() 的产品。
print(df)
Product Color Weight
0 A Red 13.11
谢谢
【问题讨论】:
标签: python-3.x pandas duplicates