Challenge: Dropping Null Values
If a dataset contains rows with null values, consider removing them. In pandas, you can do this using the dropna() method.
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 17
single
Challenge: Dropping Null Values
Sveip for å vise menyen
If a dataset contains rows with null values, consider removing them. In pandas, you can do this using the dropna() method.
Oppgave
Sveip for å begynne å kode
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
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 17
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår