Course Content
Pandas First Steps
Pandas First Steps
Challenge: Filling Null Values
To handle null values while retaining each row of the DataFrame, we can utilize the fillna()
method. This allows us to populate each empty cell with a specific value (like a string or number) rather than eliminating it.
To replace null values with the number 0, the fillna()
method is used:
Swipe to start coding
You are given a DataFrame
named wine_data
.
- Replace null values with the string
'no'
.
Solution
Thanks for your feedback!
Challenge: Filling Null Values
To handle null values while retaining each row of the DataFrame, we can utilize the fillna()
method. This allows us to populate each empty cell with a specific value (like a string or number) rather than eliminating it.
To replace null values with the number 0, the fillna()
method is used:
Swipe to start coding
You are given a DataFrame
named wine_data
.
- Replace null values with the string
'no'
.
Solution
Thanks for your feedback!