text_plain_output_1.png image_output_1.png
import pandas as pd

import seaborn as sns

df = pd.read_csv('../input/car-price-prediction/CarPrice_Assignment.csv')

df.describe(include='all').style.background_gradient(cmap='Blues').set_properties(**{'font-family': 'Segoe UI'})

def pie_plot(df, cols_list, rows, cols):
    fig, axes = plt.subplots(rows, cols)
    for ax, col in zip(axes.ravel(), cols_list):
        df[col].value_counts().plot(ax=ax, kind='pie', figsize=(15, 15), fontsize=10, autopct='%1.0f%%')
        ax.set_title(str(col), fontsize = 12)
    plt.show()

df_c = df.copy()

df_c = df_c.drop_duplicates()

df_c = pd.get_dummies(df_c, columns=['fueltype', 'aspiration', 'carbody', 'drivewheel', 'enginelocation', 'enginetype', 'fuelsystem'])

df_c = pd.get_dummies(df_c, columns=['CarName'])

def box_plot(num_cols):
    for i in range(len(num_cols)):
        if i == 16:
            break
        else:
            l = num_cols[i]

box_plot(['symboling', 'doornumber', 'wheelbase', 'carlength', 'carwidth', 'carheight', 'curbweight', 'cylindernumber', 'enginesize', 'boreratio', 'stroke', 'compressionratio', 'horsepower', 'peakrpm', 'citympg', 'highwaympg'])