The code block shown below contains an error. The code block is intended to create a single-column DataFrame from Python list years which is made up of integers. Identify the error.
Code block:
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.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
5effea7
4 months, 2 weeks agoazure_bimonster
9 months, 2 weeks agosaryu
9 months, 3 weeks ago