Ultimate access to all questions.
Upgrade Now 🚀
Sign in to unlock AI tutor
You are working with a DataFrame df that contains a column email which should not contain any instances of '@example.com'. How would you validate this using Spark? Provide the code snippet.
df
email
A
df.filter(col('email').contains('@example.com'))
B
df.filter(!col('email').contains('@example.com'))
C
df.select('email').distinct().filter(col('email').contains('@example.com'))
D
df.select('email').filter(!col('email').contains('@example.com'))