I have a pandas data frame:
a b c d
./. 0/1 ./. 0/1
0/1 1/1 0/0 1/1
0/1 1/1 ./. 1/1
I want to know, how can I get the total number of "0" and "1" in each row same as:
a b c d C0 C1
./. 0/1 ./. 0/1 2 2
0/1 1/1 0/0 1/1 3 5
0/1 1/1 ./. 1/1 1 5
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…