image_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

df = pd.read_csv('/kaggle/input/flight-price-prediction/Clean_Dataset.csv')

df.shape

df.drop('Unnamed: 0', axis=1, inplace=True)

df.isnull().sum()

df.columns

df.airline.value_counts()

plt.figure(figsize=(10, 8))
plt1 = df.airline.value_counts().plot(kind='bar')
plt.title('Airline histogram', fontsize=20)
plt1.set(xlabel = 'airline', ylabel='Frequency of airline')

plt.figure(figsize=(20,8))
plt.subplot(1,2,1)
plt.title('Source histogram')
plt1 = df['source_city'].value_counts().plot(kind='bar')
plt1.set(xlabel = 'Source city', ylabel='Frequency of source city')

plt.subplot(1,2,2)
plt.title('Destination histogram')
plt1 = df['destination_city'].value_counts().plot(kind='bar')
plt1.set(xlabel = 'Destination city', ylabel='Frequency of destination city')
plt.show()

df.departure_time.value_counts()

plt.figure(figsize=(20,8))
plt.subplot(1,2,1)
plt.title('Departure time histogram')
plt1 = df.departure_time.value_counts().plot(kind='bar')
plt1.set(xlabel = 'Departure time', ylabel='Frequency of Departure time')

plt.subplot(1,2,2)
plt.title('Arrival time histogram')
plt1 = df.arrival_time.value_counts().plot(kind='bar')
plt1.set(xlabel = 'Arrival time', ylabel='Frequency of Arrival time')
plt.show()

df.stops.value_counts()

df.columns