df = pd.read_csv('car data.csv')
df.head()
|
Car_Name |
Year |
Selling_Price |
Present_Price |
Kms_Driven |
Fuel_Type |
Seller_Type |
Transmission |
Owner |
0 |
ritz |
2014 |
3.35 |
5.59 |
27000 |
Petrol |
Dealer |
Manual |
0 |
1 |
sx4 |
2013 |
4.75 |
9.54 |
43000 |
Diesel |
Dealer |
Manual |
0 |
2 |
ciaz |
2017 |
7.25 |
9.85 |
6900 |
Petrol |
Dealer |
Manual |
0 |
3 |
wagon r |
2011 |
2.85 |
4.15 |
5200 |
Petrol |
Dealer |
Manual |
0 |
4 |
swift |
2014 |
4.60 |
6.87 |
42450 |
Diesel |
Dealer |
Manual |
0 |
pd.crosstab(index=df["Fuel_Type"], columns=df["Transmission"])
Transmission |
Automatic |
Manual |
Fuel_Type |
|
|
CNG |
0 |
2 |
Diesel |
12 |
48 |
Petrol |
28 |
211 |