Ultimate access to all questions.
Upgrade Now 🚀
Sign in to unlock AI tutor
Identify the error in the following code block intended to create a single-column DataFrame from a Python list years containing integers:
years
spark.createDataFrame(years, IntegerType)
A
The column name must be specified.
B
The years list should be wrapped in another list like [years] to make clear that it is a column rather than a row.
C
There is no createDataFrame operation in spark.
D
The IntegerType call must be followed by parentheses.
E
The IntegerType call should not be present — Spark can tell that list years is full of integers.