image_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

training_set = pd.read_csv('/kaggle/input/aviachipta-narxini-bashorat-qilish/train_data.csv')
test_set = pd.read_csv('/kaggle/input/aviachipta-narxini-bashorat-qilish/test_data.csv')

airlines = list(training_set.airline) + list(test_set.airline)
flights = list(training_set.flight) + list(test_set.flight)
source_cities = list(training_set.source_city) + list(test_set.source_city)
departure_times = list(training_set.departure_time) + list(test_set.departure_time)
stops = list(training_set.stops) + list(test_set.stops)
arrival_times = list(training_set.arrival_time) + list(test_set.arrival_time)
destination_cities = list(training_set.destination_city) + list(test_set.destination_city)
classes = list(training_set['class']) + list(test_set['class'])

training_set.nunique()

training_set.drop(['id'], axis=1, inplace=True)
training_set.drop(['flight'], axis=1, inplace=True)

from turtle import title
plt.figure(figsize=(15,5))
NF = sns.countplot(x='airline', data = training_set)
NF.set(xlabel='Hindiston aviakompaniyalari', ylabel='Reyslar soni', title='Aviakompaniyalar tomonidan amalga oshirilgan parvozlar')
plt.show(NF)

from turtle import title
plt.figure(figsize=(15,5))
CE = sns.stripplot(x='price', y='class',hue="class", data = training_set)
CE.set(xlabel='Bilet narxlari', ylabel='Sayohat klasslari', title="Sayohat klassi bo'yicha narxlar oralig'i")
plt.show(CE)

from turtle import title
plt.figure(figsize=(15,5))
TA = sns.countplot(x='class', data = training_set)
TA.set(xlabel='Sayohat klassi', title="Sayohat klassiga ko'ra chiptalar mavjudligi")
plt.show(TA)

plt.figure(figsize=(15, 5))
PD = sns.scatterplot(x=training_set['duration'], y=training_set['price'], hue=training_set['airline'])
PD.set(xlabel='Parvoz davomiyligi', ylabel='Bilet Narxi', title='Narx va turli aviakompaniyalar uchun parvoz davomiyligi')
plt.show(PD)