1

On my Ubuntu machine, I am using the Python client for GridDB. I need to search through a database stored in a GridDB container and delete the column(s) containing too many NULL values. The NULL values are "too many" when there are more NULL values than filled values in a single column. How do I achieve that?

EDIT:

If there is data that looks like this:

 c1 |  c2  |  c3  |  c4  |  c5  |  c6  |  c7  |  c8  |  c9  |  c10
----+------+------+------+------+------+------+------+------+------
 42 | 33   | 42   | NULL | 12   | 33   | 24   | 15   | 75   | 80
 53 | 44   | 66   | 44   | 95   | NULL | 57   | 63   | 61   | NULL
 57 | NULL | NULL | 45   | 72   | NULL | 76   | 13   | 62   | 66
 75 | 49   | 23   | 89   | 67   | 22   | 12   | 52   | 22   | 66
 42 | 22   | NULL | 62   | 82   | NULL | 45   | 76   | 56   | 24
 64 | 10   | 71   | 81   | 85   | NULL | 90   | 72   | 62   | 73

The sixth column, c6, should be dropped since it contains four NULL values, which is more than half of the entire row count.

End of EDIT

I have tried to search through the GridDB documentation and SQL reference, but I still need a way to get all the information together and make my problem get solved. Could you help?

0 Answers0