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: Dropping Null Values
If the dataset has rows with null values, we should consider removing them. In pandas
, this can be achieved using the dropna()
method.
Task
Swipe to start coding
You are given a DataFrame
named wine_data
.
- Get the length of this
DataFrame
before removing null values and assign the result to thelength_before
variable. - Remove rows with null values and store the resulting
DataFrame
inwine_data
. - Get the length of
wine_data
after removing null values and assign the result to thelength_after
variable.
Solution
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 8
Challenge: Dropping Null Values
If the dataset has rows with null values, we should consider removing them. In pandas
, this can be achieved using the dropna()
method.
Task
Swipe to start coding
You are given a DataFrame
named wine_data
.
- Get the length of this
DataFrame
before removing null values and assign the result to thelength_before
variable. - Remove rows with null values and store the resulting
DataFrame
inwine_data
. - Get the length of
wine_data
after removing null values and assign the result to thelength_after
variable.
Solution
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 8