Complete the code to read a CSV file into a DataFrame.
df = spark.read.csv([1])The file path must be a string, so it needs quotes.
Complete the code to read a CSV file with header option enabled.
df = spark.read.option("header", [1]).csv("data.csv")
The option value must be a string, so use "true" with quotes.
Fix the error in the code to read a CSV file with delimiter set to comma.
df = spark.read.option("delimiter", [1]).csv("data.csv")
The delimiter must be a string with a comma inside double quotes.
Fill both blanks to read a CSV file with header and inferSchema options enabled.
df = spark.read.option("header", [1]).option("inferSchema", [2]).csv("data.csv")
Both options require string values "true" to enable them.
Fill all three blanks to read a CSV file with header, inferSchema, and delimiter options set.
df = spark.read.option("header", [1]).option("inferSchema", [2]).option("delimiter", [3]).csv("data.csv")
Enable header and inferSchema with "true" strings, and set delimiter to comma ",".
