how to count nas in a column in r python code example Example: how to count the number of NA in r sum(is.na(df$col))