📌  相关文章
📜  在 groupby 之后获取最大值索引 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:56.486000             🧑  作者: Mango

代码示例1
You can sort the dataFrame by count and then remove duplicates. I think it's easier:
df.sort_values('count', ascending=False).drop_duplicates(['Sp','Mt'])