Ultimate access to all questions.
Upgrade Now 🚀
Sign in to unlock AI tutor
Which of the following code blocks correctly reads a CSV file from the specified path filePath into a DataFrame using the given schema schema?
filePath
schema
A
spark.read().csv(filePath)
B
spark.read().schema(“schema”).csv(filePath)
C
spark.read.schema(schema).csv(filePath)
D
spark.read.schema(“schema”).csv(filePath)
E
spark.read().schema(schema).csv(filePath)