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

Replacing missing values

In the previous exercise, you analyzed the college dataset and identified that '.' represented a missing value in the data. In this exercise, you will learn the best way to handle such values using the pandas module.

You will learn how to handle such values when importing a CSV file into pandas using its read_csv() function and adjusting its na_values argument, which allows you to specify the DataFrame's missing values.

The dataset has been loaded as college.csv. Both pandas and numpy have already been imported as pd and np respectively.

Bu egzersiz, kursun bir parçasıdır

Dealing with Missing Data in Python

Kursa Göz Atın

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

# Read the dataset 'college.csv' with na_values set to '.'
college = pd.read_csv(___, ___)
print(college.head())
Kodu Düzenle ve Çalıştır