000012 000013 000014 ... 004004 005585 007682
0 0 3.8 3.7 ... 1.1 4.8 0.4
1 0 0 0.0 ... 0.0 5 7.8
2 0 0 0.0 ... 0.0 1.6 2.1
3 0 0 2.0 ... 2.3 0 0.4
4 0 0 1.3 ... 0.2 1.3 0.1
5 0 0 0.0 ... 0.0 4.1 3.5
6 0 0 0.0 ... 0.6 0.2 0.3
7 0 0 0.0 ... 0.0 0 7.1
8 0 0 0.0 ... 0.0 0 0.0
I have something like this. I need compare each column value to know how many times appears values greater than 1 in each column.
I have tried this:
s.set_index(s.index).gt(1).sum(1).reset_index(name='result').fillna(s)
but it gets an error:
Could not operate 1 with block values '>' not supported between instances of 'numpy.ndarray' and 'int'
The values of the columns are floats.
Someone knows like I solve it?? Thanks!