Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

UNI-VARIATE AND BI-VARIATE ANALYSIS:

E. VETRIVEL
212220040176
CSE

CODE:
**UNI-VARIATE ANALYSIS**
import pandas as pd
import seaborn as sns
import numpy as np

from google.colab import files


uploaded = files.upload()

df=pd.read_csv("/content/FlightInformation.csv")
df.info()

df.dtypes

df['Route'].value_counts()

df.describe()

sns.boxplot(x="Price", data=df)

sns.countplot(x="Price", data=df)

sns.distplot(df["Price"])

sns.histplot(x="Price", data=df)

**MULTI-VARIATE ANALYSIS**

df.head(3)

sns.scatterplot(df['Route'], df['Price'])

sns.barplot(x=df['Source'], y=df['Price'], data=df)

df.info()
import matplotlib.pyplot as plt

states=df.loc[:,["Airline","Price"]]
states=states.groupby(by=["Airline"]).sum().sort_values(by="Price")
plt.figure(figsize=(17,7))
sns.barplot(x=states.index,y="Price",data=states)
plt.xticks(rotation = 90)
plt.xlabel=("AIRLINE")
plt.ylabel=("PRICE")
plt.show()

sns.barplot(df['Destination'], df['Price'],hue=df['Source'])

df.corr()

sns.heatmap(df.corr(),annot=True))

OUTPUT:

You might also like