The code block shown below contains an error. The code block is intended to print the schema of DataFrame storesDF. Identify the error.
Code block:
storesDF.printSchema.getAs[String]
The code block shown below contains an error. The code block is intended to print the schema of DataFrame storesDF. Identify the error.
Code block:
storesDF.printSchema.getAs[String]
The printSchema member of DataFrame is an operation that prints the schema directly, so there is no need to call getAs. The correct way to print the schema of a DataFrame in this context is by using storesDF.printSchema().
storesDF.printSchema() would be enough in this case
question is formulated poorly, but most possibly it's D