Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Filling Null Values | Section
Data Manipulation with pandas
Seção 1. Capítulo 18
single

single

bookChallenge: Filling Null Values

Deslize para mostrar o menu

To handle null values while keeping all rows in the DataFrame, use the fillna() method. It allows you to replace each empty cell with a specific value (such as a string or number) instead of removing it.

To replace null values with the number 0, the fillna() method is used:

import pandas as pd
df = pd.read_csv(file.csv)
new_df = df.fillna(0)
Tarefa

Swipe to start coding

You are given a DataFrame named wine_data.

  • Replace null values with the string 'no'.

Solução

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 1. Capítulo 18
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

some-alt