Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Challenge: Filling Null Values | Analyzing the Data
Introduction to Pandas
セクション 3.  9
single

single

bookChallenge: Filling Null Values

メニューを表示するにはスワイプしてください

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)
タスク

スワイプしてコーディングを開始

You are given a DataFrame named wine_data.

  • Replace null values with the string 'no'.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 3.  9
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt