BuildlyBuildly
DashboardExercisesProfileHelp
Data Science/Module 2: Data Analytics/Selection & Indexing3/3
Exercise·7 min·10 XP

Filter Rows by a Threshold

Context. Keep only the rows whose score passes a threshold.

Your task. Write rows_where_score_ge(df, threshold) that returns the rows of df where score >= threshold. Preserve original row order.

Example. scores [90, 75, 85, 60], threshold=80 → rows with scores 90 and 85.

Notes. Threshold higher than every score → empty DataFrame. Threshold lower than every score → all rows.

Previous
Slice Rows by Position
Next
Filter by Set Membership