I have a dataframe with the counts of each columns:
+----------------------+----------------------+----------------------+----------------------+
|count(mandatoryField1)|count(mandatoryField2)|count(mandatoryField3)|count(mandatoryField4)|
+----------------------+----------------------+----------------------+----------------------+
| 2| 0| 2| 1|
+----------------------+----------------------+----------------------+----------------------+
The select count(*) from tbl gives a result 2. Some fields have null values and therefore some are less than 2.
What I want now is to have a list of all columns which have a count less than 2.
How can I do this with java?