Sektion 1. Kapitel 22
single
Challenge: Slicing and Subsetting
Stryg for at vise menuen
Opgave
Stryg for at begynde at kode
Subset a data frame based on a condition and select specific columns.
- Filter rows in
dfwhere the value incondition_colequalscondition_value. - Select only the columns specified in
select_colsfrom the filtered rows. - Return the resulting data frame.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 22
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat