0

I have the following dataset:

      A     B     C     D
0  0.46  0.23   NaN  0.41
1  0.65  0.48  0.07  0.15
2   NaN  1.00  0.79  0.09
3  0.50  0.97  0.07  0.55
4  0.45  0.44  0.23  0.41
5   NaN  0.39   NaN  0.31
6  0.32  0.87  0.73  0.57
7  0.82  0.67  0.73  0.19
8  0.65   NaN   NaN  0.81
9  0.36  0.23  1.00  0.51

I would like to delete rows in which there are 2 or more values missing (or specify as more than 50% missing?), therefore I would like to delete rows 5 and 8 and get the following output:

      A     B     C     D
0  0.46  0.23   NaN  0.41
1  0.65  0.48  0.07  0.15
2   NaN  1.00  0.79  0.09
3  0.50  0.97  0.07  0.55
4  0.45  0.44  0.23  0.41
6  0.32  0.87  0.73  0.57
7  0.82  0.67  0.73  0.19
9  0.36  0.23  1.00  0.51

Thank you.

michael0196
  • 1,497
  • 1
  • 9
  • 21

0 Answers0