Destination
Now you'll encode the dest column just like you did in the previous exercise.
Bu egzersiz
Foundations of PySpark
kursunun bir parçasıdırEgzersiz talimatları
- Create a
StringIndexercalleddest_indexerby callingStringIndexer()withinputCol="dest"andoutputCol="dest_index". - Create a
OneHotEncodercalleddest_encoderby callingOneHotEncoder()withinputCol="dest_index"andoutputCol="dest_fact".
Uygulamalı interaktif egzersiz
Bu örnek kodu tamamlayarak bu egzersizi bitirin.
# Create a StringIndexer
dest_indexer = ____
# Create a OneHotEncoder
dest_encoder = ____