
Explanation:
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')).
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.
No comments yet.