![](/img/trans.png)
[英]Python Pandas: Counting the Frequency of unique values over all Columns
[英]Python: counting frequency for two columns with the same possible values
我有兩列有兩個可能的值 (0 或 1) 。 一列是預測值,另一列是真實值。 像這樣的東西。
ID Predicted Real
1 1 1
2 1 0
3 0 0
4 0 1
5 1 0
6 1 0
我想計算每列 0 和 1的頻率。 像這樣的東西
Value Predicted Real
1 4 2
0 2 4
我想用結果制作一個垂直條形圖
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.