Avsnitt 1. Kapitel 17
single
Challenge: Dropping Null Values
Svep för att visa menyn
If a dataset contains rows with null values, consider removing them. In pandas, you can do this using the dropna() method.
Uppgift
Swipe to start coding
You are given a DataFrame named wine_data.
- Get the length of this
DataFramebefore removing null values and assign the result to thelength_beforevariable. - Remove rows with null values and store the resulting
DataFrameinwine_data. - Get the length of
wine_dataafter removing null values and assign the result to thelength_aftervariable.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 1. Kapitel 17
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal