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

Filter by Numeric Range

Context. Find rows in a numeric range — e.g., transactions between two amounts.

Your task. Write amounts_between(df, low, high) that returns rows where df["amount"] is between low and high, inclusive on both ends.

Example. amounts [10, 25, 50, 75, 100], low=25, high=75 → rows with 25, 50, 75.

Notes. Both endpoints inclusive. low == high → only rows matching that exact value. Empty result if no values qualify.

Previous
Filter by Set Membership
Next
Filter by Substring (Case-Insensitive)