Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Extracting Experimental Groups | Data Manipulation for Research
Python for Researchers
Sectionย 1. Chapterย 3
single

single

bookChallenge: 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 group column is equal to "control".
  • Further filter these rows to include only those where the measurement value is greater than the mean of all measurement values in the DataFrame.
  • Return a new DataFrame containing the filtered rows, sorted by measurement in descending order.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Sectionย 1. Chapterย 3
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

some-alt