- #1
msn009
- 53
- 6
I am trying to count number of rows that has values in at least 3 columns so the output based on the image shared should be 4. I tried using the code below but it is resulting in the same shape as the whole table which is 7.
Python:
counts = df[(df[['a', 'b', 'c', 'd]] != 'no_label').count(axis=1) >= 3]