text_plain_output_1.png
import matplotlib.pyplot as plt

import os

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sns

import numpy as np
import pandas as pd
import os
import matplotlib.pyplot as plt
import seaborn as sns
import matplotlib.ticker as ticker
sns.set(rc={'figure.figsize': (11.7, 8.27)})
from sklearn.neighbors import KNeighborsClassifier
for dirname, _, filenames in os.walk('/kaggle/input'):
    for filename in filenames:
        file = os.path.join(dirname, filename)

data = pd.read_csv(file)

data.columns

data.shape

data_pie = [73452, 56428]
labels = ['1', '0']
explode = [0.1, 0]

fig, ax = plt.subplots(1,2)
sns.histplot(x="Gender", data=data, stat="density", shrink=0.9, color="steelblue", ax=ax[0])
sns.histplot(x="Customer Type", data=data,stat="density", shrink=0.9, color="steelblue",ax=ax[1])
fig.show()

fig, ax = plt.subplots(1, 2)
plt.figure(figsize= (20, 20))
sns.histplot(x="Type of Travel", data=data, stat="density", shrink=0.8, color="steelblue",ax=ax[0]);
sns.histplot(x="Class", data=data,  stat="density", shrink=0.8, color="steelblue",ax=ax[1]);
fig.show()

g = sns.countplot(x="Flight Distance", data=data, lw=0, color="red")
_xticklabels = g.get_xticklabels()
for ind, label in enumerate(_xticklabels):
    if int(label.get_text()) % 200 == 0:
        label.set_visible(True)
    else:
        label.set_visible(False)
g.set_xticklabels(_xticklabels, rotation=45)
g.set(ylim=(0, 550))

sns.heatmap(data.isnull())