I want to count an specific value in all of the data frame.
for example, we have a data frame like this:
df = pd.DataFrame({
0 : ["a", "b", "a"],
1 : ["c", "a", "b"],
2 : ["c", "b", "b"]
})
>>> df
| 0 | 1 | 2 | |
|---|---|---|---|
| 0 | a | c | c |
| 1 | b | a | b |
| 2 | a | b | b |
I want this result :
a 3
b 4
c 2
any body know, how can i do it ?!
thanks