I have the following dataframe.
ID Value1 Value2 Value3 Value4 Value5
1 0 0 50 100 0
2 0 0 0 0 0
3 0 0 0 50 0
4 0 100 0 0 0
5 50 0 100 50 50
I would like to filter IDs which has only one non-zero values. For example ID == 1 has two non-zero values but ID == 3 and 4 has only one non-zero values and I would like to filter them.
The expected output is ID 3 and 4.
ID Value1 Value2 Value3 Value4 Value5
3 0 0 0 50 0
4 0 100 0 0 0
Can anyone help on this?