Python
#12

Filter DataFrames with Multiple Conditions in Pandas

EasyAmazon
Interview Question #12
Asked at Amazon

Given an e-commerce `orders_df`, filter for orders where `category == 'Electronics'`, `status == 'Delivered'`, and `total_amount >= 5000`.

Input Table: orders_df
4 rows preview
order_idcategorystatustotal_amount
101ElectronicsDelivered6500
102ElectronicsCancelled8000
103FashionDelivered5500
104ElectronicsDelivered3200
Expected Output Structure1 rows
order_idtotal_amount
1016500
Interview Context

Asked frequently in data analyst and business analyst technical rounds. Focus on clean filtering, optimal indexing usage, and unambiguous column selection.

Python 3.10 (Pandas)
Environment Ready

Starting the real Python + pandas runtime (one-time download)…

Chat with us