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__)
Select an option, then click Submit answer.
Reference / correct answer:
1. spark 2. read 3. load 4. filePath
Most accepted answer: E. 1. spark 2. read 3. load 4. filePath
Community votes: E=3
Selected Answer: E The correct answer is: E. 1. spark 2. read 3. load 4. filePath Explanation: spark.read: This creates a DataFrameReader object for reading data. load(): This method is used to load data from a file, and when the file is in Parquet format, it can automatically infer the format without explicitly specifying it. upvoted 1 times
Selected Answer: E 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. upvoted 1 times
E. 1. spark 2. read 3. load 4. filePath upvoted 2 times
Selected Answer: E To me E is most likely correct Syntax: spark.read.load(filePath) upvoted 2 times