The code block shown below should read a parquet at the file path filePath into a DataFrame. Choose the response that correctly fills in the numbered blanks within the code block to complete this task.
Code block:
__1__.__2__.__3__(__4__)
The code block shown below should read a parquet at the file path filePath into a DataFrame. Choose the response that correctly fills in the numbered blanks within the code block to complete this task.
Code block:
__1__.__2__.__3__(__4__)
To read a parquet file into a DataFrame using PySpark, the correct syntax is `spark.read.parquet(filePath)`. Here, `spark` is the SparkSession object, `read` is a property that returns a DataFrameReader, and `parquet` is the method to read parquet files. `filePath` is the path to the parquet file.
E. 1. spark 2. read 3. load 4. filePath
To me E is most likely correct Syntax: spark.read.load(filePath)
It's E. read is a property of spark, not a method, so that makes the choice C or E. In C the parameter source is being assigned "parquet". Parquet is the format. So C is wrong. E is correct, because the default format is parquet.