Sectionย 1. Chapterย 3
single
Challenge: Extracting Experimental Groups
Swipe to show menu
Task
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.
Solution
Everything was clear?
Thanks for your feedback!
Sectionย 1. Chapterย 3
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat