📜  熊猫计数 - Python 代码示例

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

代码示例4
>>> df.set_index(["Person", "Single"]).count(level="Person")
        Age
Person
John      2
Lewis     1
Myla      1