text_html_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
plt.style.use('seaborn')
pd.set_option('display.max_columns', None)

data = pd.read_csv('../input/hotel-booking/hotel_booking.csv')
data

data.isna().sum()

data = data.drop(['agent', 'company', 'required_car_parking_spaces', 'reservation_status', 'reservation_status_date', 'country', 'name', 'email', 'phone-number', 'credit_card'], axis=1)
data

a_month = {'arrival_date_month': {'January': 1, 'February': 2, 'March': 3, 'April': 4, 'May': 5, 'June': 6, 'July': 7, 'August': 8, 'September': 9, 'October': 10, 'November': 11, 'December': 12}}
data.replace(a_month, inplace=True)

meal = {'meal': {'Undefined': 0, 'SC': 1, 'BB': 2, 'HB': 3, 'FB': 4}}
data.replace(meal, inplace=True)

segment = {'market_segment': {'Aviation': 1, 'Complementary': 2, 'Corporate': 3, 'Direct': 4, 'Groups': 5, 'Offline TA/TO': 6, 'Online TA': 7}}
data.replace(segment, inplace=True)

distribution = {'distribution_channel': {'GDS': 1, 'Corporate': 2, 'Direct': 3, 'TA/TO': 4}}
data.replace(distribution, inplace=True)

deposit = {'deposit_type': {'Refundable': 1, 'Non Refund': 0, 'No Deposit': 2}}
data.replace(deposit, inplace=True)

customer = {'customer_type': {'Contract': 2, 'Group': 3, 'Transient-Party': 1, 'Transient': 0}}
data.replace(customer, inplace=True)

data