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

Cleaning variables

Users of an online entry system used to have the ability to freely type in responses to questions. This is causing issues when trying to analyze the adoptable dogs dataset, dogs. Here is the current frequency table of the "sex" column:

male      1672
female    1249
 MALE        10
 FEMALE       5
Malez        1

Now that the system only takes responses of "female" and "male", you want this variable to match the updated system.

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.

# Fix the misspelled word 
replace_map = ____
Kodu Düzenle ve Çalıştır