Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Check for Missing Values | Preprocessing Data
Advanced Techniques in pandas

Check for Missing Values

I'm happy to see you in the last section of the course. Here, you will process data on the passengers of the Titanic. First, let's examine it:

PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
0 892 0 3 Kelly, Mr. James male 34.5 0 0 330911 7-8292 NaN Q
1 893 1 3 Wilkes, Mrs. James (Ellen Needs) female 47.0 1 0 363272 7-0 NaN S
2 894 0 2 Myles, Mr. Thomas Francis male 62.0 0 0 240276 9-6875 NaN Q
3 895 0 3 Wirz, Mr. Albert male 27.0 0 0 315154 8-6625 NaN S
4 896 1 3 Hirvonen, Mrs. Alexander (Helga E Lindqvist) female 22.0 1 1 3101298 12-2875 NaN S

The first step of our learning is finding missing values. By the way, sometimes it is difficult or even impossible to fill all the values of the column; some of them may be missing. Such cases can spoil your result. In the dataset, they always look like this: NaN. First, let's find out if your data set contains missing values.

Pandas has two functions you can apply to the dataset to find missing values. Both of them will put False if the dataset values aren't missing, and True otherwise.

Please select the INCORRECT ways of checking for missing values.

Selecciona unas respuestas correctas

¿Todo estuvo claro?

Sección 5. Capítulo 1
course content

Contenido del Curso

Advanced Techniques in pandas

Check for Missing Values

I'm happy to see you in the last section of the course. Here, you will process data on the passengers of the Titanic. First, let's examine it:

PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
0 892 0 3 Kelly, Mr. James male 34.5 0 0 330911 7-8292 NaN Q
1 893 1 3 Wilkes, Mrs. James (Ellen Needs) female 47.0 1 0 363272 7-0 NaN S
2 894 0 2 Myles, Mr. Thomas Francis male 62.0 0 0 240276 9-6875 NaN Q
3 895 0 3 Wirz, Mr. Albert male 27.0 0 0 315154 8-6625 NaN S
4 896 1 3 Hirvonen, Mrs. Alexander (Helga E Lindqvist) female 22.0 1 1 3101298 12-2875 NaN S

The first step of our learning is finding missing values. By the way, sometimes it is difficult or even impossible to fill all the values of the column; some of them may be missing. Such cases can spoil your result. In the dataset, they always look like this: NaN. First, let's find out if your data set contains missing values.

Pandas has two functions you can apply to the dataset to find missing values. Both of them will put False if the dataset values aren't missing, and True otherwise.

Please select the INCORRECT ways of checking for missing values.

Selecciona unas respuestas correctas

¿Todo estuvo claro?

Sección 5. Capítulo 1
some-alt