IniziaInizia gratis

Detecting missing values

Datasets usually come with hidden missing values filled in for missing values like 'NA', '.' or others. In this exercise, you will work with the college dataset which contains various details of college students. Your task is to identify the missing values by analyzing the dataset.

To achieve this, you can use the .info() method from pandas and the numpy function sort() along with the .unique() method to clearly distinguish the dummy value representing the missing data.

The college.csv file has been loaded for you. The packages numpy and pandas have already been imported as np and pd respectively.

Questo esercizio fa parte del corso

Dealing with Missing Data in Python

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Read the dataset 'college.csv'
college = ___
print(college.head())
Modifica ed esegui il codice