How many gaps in each column
Your task
Given readings with columns device, ts and reading, count the missing values in every column. Return column and nulls, one row per column, sorted by column ascending.
Examples
null_counts(readings: dataframe) -> dataframeExample 1
Input
null_counts(readings)readings
| device | ts | reading |
|---|---|---|
| a1 | 2024-05-01 | 20.5 |
| a1 | 2024-05-02 | NULL |
| a1 | 2024-05-03 | 22.5 |
| b2 | 2024-05-01 | NULL |
| b2 | 2024-05-02 | 31 |
| b2 | 2024-05-03 | 33 |
Output
| column | nulls |
|---|---|
| device | 0 |
| reading | 2 |
| ts | 0 |