I have a dataframe which looks like:
col1 col2 col3
0 0 .4
.3 1 0
0 0 .8
I'd like to create a new column which counts the number of column values greater than 0 in the other three rows:
col1 col2 col3 col4
0 0 .4 1
.3 1 0 2
0 0 .8 1