In the Petal Power Project here:
Petal Power Project
Youtube video solution
On task 5 they ask
Another customer emails to ask what types of seeds are sold at the Brooklyn location. Select all rows where
location
is equal toBrooklyn
andproduct_type
is equal toseeds
and save them to the variableseed_request
.
The solution is: seed_request = inventory[(inventory['location'] == 'Brooklyn') & (inventory['product_type'] == 'seeds')]
My first attempt was: seed_request = inventory.apply(lambda row: row if (row['location'] == 'Brooklyn') & (row['product_type'] == 'seeds') else False, axis = 1)
And I got the below result:
Do you know why this is not working ?