4.29 countnull - Sum total

Format 1: countnull($num_1,num_2,\cdots $)

Format 2: countnull($str_1,str_2,\cdots $)

Format 3: countnull($date_1,date_2,\cdots $)

Format 4: countnull($time_1,time_2,\cdots $)

Format 5: countnull($bool_1,bool_2,\cdots $)

Return the number of NULL values in $num_ i$ (same for other types).

Examples

Example 1: Basic Example

$ more dat1.csv
a,b,c,d
1,,3,4
1,,,
,,,
$ mcal c='countnull(${a},${b},${c},${d})' a=rsl i=dat1.csv o=rsl1.csv
#END# kgcal a=rsl c=countnull(${a},${b},${c},${d}) i=dat1.csv o=rsl1.csv
$ more rsl1.csv
a,b,c,d,rsl
1,,3,4,1
1,,,,3
,,,,4

Example 2: Specify other types of data format in field with wildcard character

$ mcal c='countnull($s{*})' a=rsl i=dat1.csv o=rsl2.csv
#END# kgcal a=rsl c=countnull($s{*}) i=dat1.csv o=rsl2.csv
$ more rsl2.csv
a,b,c,d,rsl
1,,3,4,1
1,,,,3
,,,,4