I would like to take only product equal to "Bikes"
from the table below and group the years. I need it to create a plot where i want show how the sale of bicycles has been over the years.
yearsbuy = df[['Year', 'Product_Category', 'Country']]
plot1 = yearsbuy.groupby('Year')['Product_Category'].value_counts()
plot1 = plot1['Product_Category'] =='Bikes'
When i did i get :
Year Product_Category
2011 Bikes 2677
2012 Bikes 2677
2013 Accessories 15025
Bikes 5710
Clothing 3708
2014 Accessories 20035
But I want just only Bikes. Why yearsbuy['Product_Category'] == "Bikes"
isn't working ?