The code block shown below contains an error. The code block is intended to return a collection of summary statistics for column sqft in Data Frame storesDF. Identify the error.
Code block:
storesDF.describes(col("sgft "))
The code block shown below contains an error. The code block is intended to return a collection of summary statistics for column sqft in Data Frame storesDF. Identify the error.
Code block:
storesDF.describes(col("sgft "))
The describe() operation does not accept a Column object as an argument — the column name string 'sqft' should be specified instead. The syntax should be storesDF.describe('sqft') to compute summary statistics for the 'sqft' column.
Answer D correct https://spark.apache.org/docs/latest/api/python/reference/pyspark.sql/api/pyspark.sql.DataFrame.describe.html