【发布时间】:2018-06-08 03:12:21
【问题描述】:
我需要在我的数据框中使用计数器值 1、2、3 等订购重复项。输入数据框如下所示:
Key Amount
xyz 1000
xyz1 870
xyz2 1000
xyz3 1000
xyz4 650
预期输出为
Key Amount Duplicate_order
xyz 1000 1
xyz1 870 1
xyz2 1000 2
xyz3 1000 3
xyz4 650 1
【问题讨论】:
标签: python python-3.x pandas duplicates