【发布时间】:2017-11-11 10:24:23
【问题描述】:
我有一个数据框。 Click here to get the pic of the dataframe:
换句话说:
MALE/M/male/Male 表示男性。
Female,F,Fem 表示女性。
YES/yes/yeah 表示正面回答。
否定回答用 no/NO/nope 表示。
所以,对于上述数据框,我想在 Python 中计数,男性的总数,女性的总数, total 正面回应的数量和 total 负面回应的数量。我该怎么做?
【问题讨论】:
-
您可以使用 df.to_clipboard() 获取数据帧的样本,它比图像更能帮助人们掌握您的数据。
标签: python pandas dataframe count