# 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 cpc = cars['cars_per_cap'] between = np.logical_and(cpc > 100, cpc < 500) medium = cars[between] # Print medium print(medium)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter