Course Content
Pandas First Steps
Pandas First Steps
2. Reading Files in Pandas
3. Analyzing the Data
Viewing the DataQuiz: Using HeadQuiz: Head, Tail, and SampleExploring the DatasetColumn Names and Data TypesFinding Null ValuesQuiz: Identifying Null ValuesChallenge: Dropping Null ValuesChallenge: Filling Null ValuesQuiz: Null ValuesDescribing the Datamax() and min()Quiz: Statistical Operationssum() and count()Unique Values
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:
Task
Swipe to show code editor
- Replace null values in this DataFrame with the string
'no'
. - Print the general information of the DataFrame.
Solution
Switch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 9
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:
Task
Swipe to show code editor
- Replace null values in this DataFrame with the string
'no'
. - Print the general information of the DataFrame.
Solution
Switch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 9
Switch to desktop for real-world practiceContinue from where you are using one of the options below