QuestionQ123
VerifiedData ProcessingA data scientist is preparing a machine-learning dataset in Databricks. The dataset includes a categorical feature named color, with the values “red”, “blue”, and “green”. They want to apply one-hot encoding to transform this feature for model training.
Which approach correctly implements one-hot encoding for the color feature with PySpark?
Community Discussion