Hello, I need some help with this.
Ask the LLM to help you create a pie chart of the data showing how many cars were sold each year.
Here is the code:
import pandas as pd
Dataset adapted from here Vehicle dataset | Kaggle
data = pd.read_csv(‘car_data.csv’)
print(data)
Model Price Year Kilometer
0 Honda Amaze 1.2 VX i-VTEC 5050.00 2017 87150
1 Honda Brio V MT 3510.00 2014 39276
2 Honda WR-V VX MT Petrol 8199.99 2018 27963
3 Honda CR-V 2.4 AT 8600.00 2013 67000
4 Honda Brio S MT 4400.00 2016 50374
… … … … …
153 Honda Accord 2.4 iVtec AT 1950.00 2008 57885
154 Honda City SV Diesel 7500.00 2018 75000
155 Honda City V 7300.00 2016 51834
156 Honda City SV CVT 5900.00 2015 116592
157 Honda City V 4800.00 2015 49000
[158 rows x 4 columns]
What I don’t understand is that we only have the model years of the cars, not the years they were sold. So how can I create this chart?