1. Învăţa
  2. /
  3. Courses
  4. /
  5. Data Transformation with Polars

Connected

exercise

Matching listings to budget requests

Budget is often the first filter travelers apply when searching for accommodation. You have a requests DataFrame with traveler preferences including maximum price. Match each listing to requests where the listing price is within the traveler's budget.

polars is loaded as pl, and the DataFrames hotels and requests are available for you.

Instrucţiuni

100 XP
  • Match hotels to requests where the listing price is at or below the request's max_price.
  • Print a few rows to see the matches.