НачатьНачать бесплатно

Destination

Now you'll encode the dest column just like you did in the previous exercise.

Это упражнение является частью курса

Foundations of PySpark

Посмотреть курс

Инструкции к упражнению

  • Create a StringIndexer called dest_indexer by calling StringIndexer() with inputCol="dest" and outputCol="dest_index".
  • Create a OneHotEncoder called dest_encoder by calling OneHotEncoder() with inputCol="dest_index" and outputCol="dest_fact".

Интерактивное практическое упражнение

Попробуйте выполнить это упражнение, дополнив этот пример кода.

# Create a StringIndexer
dest_indexer = ____

# Create a OneHotEncoder
dest_encoder = ____
Редактировать и запускать код