Hi, I am working on pandas library learning in the following link:
I got stuck on task 5 so I take a look at pro’s video given by codecademy.
The pro use “&” as and operator. But I also find in this link and operator can be written in python as “and”
below is my code. Please tell me if we can use the keyword “and” as the solution to this task 5.
import codecademylib3 import pandas as pd inventory=pd.read_csv("inventory.csv") print(inventory.head(10)) staten_island=inventory.iloc[:10] product_request=staten_island['product_description'] seed_request=inventory[(inventory.location=='Brooklyn')& (inventory.product_type=='seeds')]