1. Învăţa
  2. /
  3. Courses
  4. /
  5. Foundations of PySpark

Connected

exercise

Destination

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

Instrucţiuni

100 XP
  • 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".