BaşlayınÜcretsiz Başlayın

Create a label encoding and map

A used car company believes that they can predict a car's sales price reasonably well using their used_cars dataset. One of the variables they want to use, "color", needs to be converted to codes. The company believes that a car's color will be important when predicting sales price.

Bu egzersiz

Working with Categorical Data in Python

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Convert to categorical and print the frequency table
used_cars["color"] = ____
print(used_cars["color"].value_counts())
Kodu Düzenle ve Çalıştır