
Answer-first summary for fast verification
Answer: All fields should be of type double.
SparkML's Imputer necessitates that all fields in the DataFrame are of type double. This can be achieved by casting each column to double, for example, using `df.withColumn(c, col(c).cast('double'))`.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
What is a prerequisite for all fields in a DataFrame before utilizing SparkML's Imputer?
A
All fields should be of type boolean.
B
All fields should be of type float.
C
All fields should be of type string.
D
All fields should be of type integer.
E
All fields should be of type double.