Challenge: Extracting Experimental Groups
Opgave
Swipe to start coding
Write a function to filter and sort the DataFrame as described, using pandas methods for filtering and sorting.
- Filter the input DataFrame to include only rows where the
groupcolumn is equal to"control". - Further filter these rows to include only those where the
measurementvalue is greater than the mean of allmeasurementvalues in the DataFrame. - Return a new DataFrame containing the filtered rows, sorted by
measurementin descending order.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 3
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
Fantastisk!
Completion rate forbedret til 5
Challenge: Extracting Experimental Groups
Stryg for at vise menuen
Opgave
Swipe to start coding
Write a function to filter and sort the DataFrame as described, using pandas methods for filtering and sorting.
- Filter the input DataFrame to include only rows where the
groupcolumn is equal to"control". - Further filter these rows to include only those where the
measurementvalue is greater than the mean of allmeasurementvalues in the DataFrame. - Return a new DataFrame containing the filtered rows, sorted by
measurementin descending order.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 3
single