text_html_output_1.png
from sklearn.preprocessing import OneHotEncoder

from sklearn.preprocessing import StandardScaler

import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

import pandas as pd
import numpy as np
import os
import matplotlib.pyplot as plt
import seaborn as sns
plt.rcParams.update({'font.size': 14})

df = pd.read_csv('/kaggle/input/airways-customer-data/filtered_customer_booking.csv', index_col=0)

df = df.reset_index(drop=True)

df_final = df

from sklearn.preprocessing import OneHotEncoder
encoder = OneHotEncoder(handle_unknown='ignore')
encoder_df = pd.DataFrame(encoder.fit_transform(df[['sales_channel']]).toarray())
encoder_df = encoder_df.rename(columns={0: 'Internet', 1: 'Mobile'})
df_final = df_final.join(encoder_df)
encoder_df = pd.DataFrame(encoder.fit_transform(df[['trip_type']]).toarray())
encoder_df = encoder_df.rename(columns={0: 'RoundTRip', 1: 'OneWayTrip', 2: 'CircleTrip'})
df_final = df_final.join(encoder_df)

df_final.drop(['sales_channel', 'trip_type', 'booking_origin', 'route'], axis=1, inplace=True)

df_final = df_final.drop('booking_complete', axis=1)

from sklearn.preprocessing import StandardScaler
scaler = StandardScaler()
scaled_df = scaler.fit_transform(df_final)

scaled_df = pd.DataFrame(scaled_df, columns=df_final.columns)

corr = scaled_df.corr()
plt.figure(figsize=(10, 7))
sns.heatmap(corr)