Ultimate access to all questions.
Upgrade Now 🚀
Sign in to unlock AI tutor
Given a DataFrame df with a column 'age' that contains integer values, including NULLs, how would you use the 'count' function to count the number of non-NULL values in the 'age' column?
A
df.select(count('age')).collect()[0][0]
B
df.select(count(col('age'))).collect()[0][0]
C
df.select(count('age').isNull()).collect()[0][0]
D
df.select(count(col('age').isNull())).collect()[0][0]