1. 学ぶ
  2. /
  3. コース
  4. /
  5. PySpark入門

Connected

演習

Destination

前の演習と同様に、dest 列をエンコードします。

指示

100 XP
  • StringIndexer() に inputCol="dest"、outputCol="dest_index" を渡して呼び出し、dest_indexer という StringIndexer を作成します。
  • OneHotEncoder() に inputCol="dest_index"、outputCol="dest_fact" を渡して呼び出し、dest_encoder という OneHotEncoder を作成します。