%matplotlib inline
import pandas as pd
vehicles = pd.read_csv("vehicles.csv")
vehicles.head()
vehicles.plot(kind = 'scatter', x = 'citympg',y='co2emissions')
vehicles['co2emissions'].plot(kind='hist')
vehicles.pivot(columns='drive',values='co2emissions')
vehicles.pivot(columns = 'drive', values = 'co2emissions').plot(kind='box',figsize = (10,6))
vehicles.groupby('year')['drive'].value_counts()
vehicles.groupby('year')['drive'].value_counts().unstack()
vehicles.groupby('year')['drive'].value_counts().unstack().plot(kind='bar',stacked=1, figsize=(10,6))