Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Finding Null Values | Analyzing the Data
Pandas First Steps
course content

Conteúdo do Curso

Pandas First Steps

Pandas First Steps

1. The Very First Steps
2. Reading Files in Pandas
3. Analyzing the Data

bookFinding Null Values

Dataframes often contain missing values, represented as None or np.NaN. When working with dataframes, it's essential to identify these missing values. For this purpose, pandas offers specific methods.

The first of these is isna(), which returns a boolean dataframe. In this context, a True value indicates a missing value within the dataframe, while a False value suggests the value is present.

For clarity, let's review an example. Run the code provided to see a dataframe filled with True and False values, offering a clearer understanding.

123456789
import pandas as pd import numpy as np dataset = {'animal': [np.NaN, 'Dog', np.NaN, 'Cat','Parrot', None], 'name': ['Dolly', None, 'Erin', 'Kelly', None, 'Odie']} animal = pd.DataFrame(dataset) # Find missing values missing_value = animal.isna() print(missing_value)
copy

The second method is isnull(). It behaves identically to the previous one, with no discernible difference between them. Let's examine its application. Running the accompanying code will show if the resulting DataFrame matches the one from the prior example.

123456789
import pandas as pd import numpy as np dataset = {'animal': [np.NaN, 'Dog', np.NaN, 'Cat','Parrot', None], 'name': ['Dolly', None, 'Erin', 'Kelly', None, 'Odie']} animal = pd.DataFrame(dataset) # Find missing values missing_value = animal.isnull() print(missing_value)
copy
Tarefa
test

Swipe to show code editor

Your objective is to pinpoint the missing values in a given dataframe named data_frame.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 6
toggle bottom row

bookFinding Null Values

Dataframes often contain missing values, represented as None or np.NaN. When working with dataframes, it's essential to identify these missing values. For this purpose, pandas offers specific methods.

The first of these is isna(), which returns a boolean dataframe. In this context, a True value indicates a missing value within the dataframe, while a False value suggests the value is present.

For clarity, let's review an example. Run the code provided to see a dataframe filled with True and False values, offering a clearer understanding.

123456789
import pandas as pd import numpy as np dataset = {'animal': [np.NaN, 'Dog', np.NaN, 'Cat','Parrot', None], 'name': ['Dolly', None, 'Erin', 'Kelly', None, 'Odie']} animal = pd.DataFrame(dataset) # Find missing values missing_value = animal.isna() print(missing_value)
copy

The second method is isnull(). It behaves identically to the previous one, with no discernible difference between them. Let's examine its application. Running the accompanying code will show if the resulting DataFrame matches the one from the prior example.

123456789
import pandas as pd import numpy as np dataset = {'animal': [np.NaN, 'Dog', np.NaN, 'Cat','Parrot', None], 'name': ['Dolly', None, 'Erin', 'Kelly', None, 'Odie']} animal = pd.DataFrame(dataset) # Find missing values missing_value = animal.isnull() print(missing_value)
copy
Tarefa
test

Swipe to show code editor

Your objective is to pinpoint the missing values in a given dataframe named data_frame.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 6
toggle bottom row

bookFinding Null Values

Dataframes often contain missing values, represented as None or np.NaN. When working with dataframes, it's essential to identify these missing values. For this purpose, pandas offers specific methods.

The first of these is isna(), which returns a boolean dataframe. In this context, a True value indicates a missing value within the dataframe, while a False value suggests the value is present.

For clarity, let's review an example. Run the code provided to see a dataframe filled with True and False values, offering a clearer understanding.

123456789
import pandas as pd import numpy as np dataset = {'animal': [np.NaN, 'Dog', np.NaN, 'Cat','Parrot', None], 'name': ['Dolly', None, 'Erin', 'Kelly', None, 'Odie']} animal = pd.DataFrame(dataset) # Find missing values missing_value = animal.isna() print(missing_value)
copy

The second method is isnull(). It behaves identically to the previous one, with no discernible difference between them. Let's examine its application. Running the accompanying code will show if the resulting DataFrame matches the one from the prior example.

123456789
import pandas as pd import numpy as np dataset = {'animal': [np.NaN, 'Dog', np.NaN, 'Cat','Parrot', None], 'name': ['Dolly', None, 'Erin', 'Kelly', None, 'Odie']} animal = pd.DataFrame(dataset) # Find missing values missing_value = animal.isnull() print(missing_value)
copy
Tarefa
test

Swipe to show code editor

Your objective is to pinpoint the missing values in a given dataframe named data_frame.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Dataframes often contain missing values, represented as None or np.NaN. When working with dataframes, it's essential to identify these missing values. For this purpose, pandas offers specific methods.

The first of these is isna(), which returns a boolean dataframe. In this context, a True value indicates a missing value within the dataframe, while a False value suggests the value is present.

For clarity, let's review an example. Run the code provided to see a dataframe filled with True and False values, offering a clearer understanding.

123456789
import pandas as pd import numpy as np dataset = {'animal': [np.NaN, 'Dog', np.NaN, 'Cat','Parrot', None], 'name': ['Dolly', None, 'Erin', 'Kelly', None, 'Odie']} animal = pd.DataFrame(dataset) # Find missing values missing_value = animal.isna() print(missing_value)
copy

The second method is isnull(). It behaves identically to the previous one, with no discernible difference between them. Let's examine its application. Running the accompanying code will show if the resulting DataFrame matches the one from the prior example.

123456789
import pandas as pd import numpy as np dataset = {'animal': [np.NaN, 'Dog', np.NaN, 'Cat','Parrot', None], 'name': ['Dolly', None, 'Erin', 'Kelly', None, 'Odie']} animal = pd.DataFrame(dataset) # Find missing values missing_value = animal.isnull() print(missing_value)
copy
Tarefa
test

Swipe to show code editor

Your objective is to pinpoint the missing values in a given dataframe named data_frame.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 3. Capítulo 6
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt