Ultimate access to all questions.
Upgrade Now 🚀
Sign in to unlock AI tutor
Given a DataFrame df with columns 'id', 'name', and 'salary', you need to identify how many rows have a NULL value in the 'salary' column. Write the PySpark code to achieve this.
A
df.filter(col('salary').isNull()).count()
B
df.filter(col('salary') == NULL).count()
C
df.filter(col('salary').isNotNull()).count()
D
df.filter(col('salary') != NULL).count()