To perform Multivariate EDA on the given data set.
Exploratory data analysis is used to understand the messages within a dataset. This technique involves many iterative processes to ensure that the cleaned data is further sorted to better understand the useful meaning.The primary aim with exploratory analysis is to examine the data for distribution, outliers and anomalies to direct specific testing of your hypothesis.
Import the built libraries required to perform EDA and outlier removal.
Read the given csv file
Convert the file into a dataframe and get information of the data.
Return the objects containing counts of unique values using (value_counts()).
Plot the counts in the form of Histogram or Bar Graph.
Use seaborn the bar graph comparison of data can be viewed.
Find the pairwise correlation of all columns in the dataframe.corr()
Save the final data set into the file
import pandas as pd
from scipy import stats
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from google.colab import files
uploaded = files.upload()
df = pd.read_csv('diabetes.csv')
df
df.isnull().sum()
q1 = df.quantile(0.25)
q3 = df.quantile(0.75)
iqr = q3 - q1
iqr
low = q1 - 1.5*iqr
high = q1 + 1.5*iqr
df = df[(df >= low) & (df <= high)]
df
sns.boxplot(df)
plt.figure(figsize = (14,6))
sns.scatterplot(x = 'Glucose',y='BloodPressure',data = df)
sns.scatterplot(x = 'Glucose',y='Insulin',data = df)
sns.scatterplot(x = 'Glucose',y='DiabetesPedigreeFunction',data = df)
sns.scatterplot(x = 'Glucose',y='Age',data = df)
sns.heatmap(df.corr(),annot = True)
from google.colab import files
uploaded = files.upload()
df = pd.read_csv('employeesal.csv')
df
df.isnull().sum()
numeric_cols = df.select_dtypes(include=[int, float])
q1 = numeric_cols.quantile(0.25);
q3 = numeric_cols.quantile(0.75);
iqr = q3 - q1
iqr
low = q1 - 1.5*iqr
high = q1 + 1.5*iqr
numeric_cols = numeric_cols[(numeric_cols >= low) & (numeric_cols <= high)]
numeric_cols.dropna()
sns.boxplot(numeric_cols)
sns.scatterplot(x = 'Salary',y='Age',data = numeric_cols)
sns.scatterplot(x = 'Experience_Years',y='Salary',data = numeric_cols)
sns.scatterplot(x = 'Experience_Years',y='Age',data = numeric_cols)
sns.heatmap(numeric_cols.corr(),annot = True)
from google.colab import files
uploaded = files.upload()
df = pd.read_csv('SuperStore.csv')
df
df.isnull().sum()
df.dropna()
df.dtypes
numeric_cols = df.select_dtypes(include=[int,float])
q1 = numeric_cols.quantile(0.25);
q3 = numeric_cols.quantile(0.75);
iqr = q3 - q1
iqr
low = q1 - 1.5*iqr
high = q1 + 1.5*iqr
numeric_cols = numeric_cols[(numeric_cols >= low) & (numeric_cols <= high)]
sns.boxplot(numeric_cols)
sns.heatmap(numeric_cols.corr(),annot = True)
Thus we have read the given data and performed the multivariate analysis with different types of plots