In [38]: df = pd.DataFrame(["Fail","OK"] * 9, columns=["status"])
In [39]: df["status"].value_counts()
Out[39]:
OK 9
Fail 9
Name: status, dtype: int64
Use value_counts()
to get the count of occurrence
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.