Well-Attended Fitness Sessions
Problem
DataFrame: `sessionsignup` (`sessionsignup.csv`)
```text
+---------+--------+
| Column | Type |
+---------+--------+
| member | object |
| session | object |
+---------+--------+
(member, session) is unique; a member signs up for any given session at most once.
```
Return the name of every `session` that has at least **5** members signed up. Return the result in any order.
Input data
Example rows — the live problem includes the full dataset.
sessionsignup
| member | session |
|---|---|
| Mia | Spin |
| Noah | Yoga |
| Liam | Spin |
| Ava | Pilates |
| Ella | Spin |
Expected output
Your answer should return 1 row with the columns session.
Starter code (Pandas (Python))
import pandas as pd
def popular_sessions(sessionsignup: pd.DataFrame) -> pd.DataFrame:
# Your code here
return sessionsignupSolve this Pandas question free
Write Pandas (Python) and run it instantly in your browser — even on your phone. No signup needed to try.
Solution & explanation
Create a free account to unlock the optimal solution, a step-by-step explanation, and the hidden test cases that grade your answer.
Sign up free to unlock