A data scientist aims to one-hot encode the databricks video

 ·  PT1H46M27S  ·  EN

ml-engineer-associate video for a data scientist aims to one-hot encode the categorical attributes in theirPySpark DataFrame, named 'features_df', by leveraging

Full Certification Question

A data scientist aims to one-hot encode the categorical attributes in theirPySpark DataFrame, named 'features_df', by leveraging Spark ML. The list of string column names has been assigned to the 'input_columns' variable. They have prepared a block of code for this operation, but it's returning an error. What modification does the data scientist need to make in their code to achieve their goal? oneHotEnc = OneHotEncoder ( InputCols = input_columns , outputCols = output_columns ) oneHotEnc_model = oneHotEnc . fit ( features_df ) oneHotEnc_features_df = oneHotEnc_model . transform ( features_df ) Choose only ONE best answer.