pandas,numpy ,np.logical_and,or,not
# Import cars data
import pandas as pd
cars = pd.read_csv('cars.csv', index_col = 0)
# Import numpy, you'll need this
import numpy as np
# Create medium: observations with cars_per_cap between 100 and 500
cars_per_cap = cars['cars_per_cap']
medium = np.logical_and(cars_per_cap>100,cars_per_cap<500)
# Print medium
print(cars[medium])