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.
#PROGRAM:
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
data=pd.read_csv("SuperStore.csv")
data
data.head()
data.info()
data.describe()
data.isnull().sum()
data.dtypes
sns.scatterplot(data['Postal Code'],data['Sales'])
states=data.loc[:,["State","Sales"]]
states=states.groupby(by=["State"]).sum().sort_values(by="Sales")
plt.figure(figsize=(17,7))
sns.barplot(x=states.index,y="Sales",data=states)
plt.xticks(rotation = 90)
plt.xlabel=("STATES")
plt.ylabel=("SALES")
plt.show()
states=data.loc[:,["State","Postal Code"]]
states=states.groupby(by=["State"]).sum().sort_values(by="Postal Code")
plt.figure(figsize=(17,7))
sns.barplot(x=states.index,y="Postal Code",data=states)
plt.xticks(rotation = 90)
plt.xlabel=("STATES")
plt.ylabel=("Postal Code")
plt.show()
states=data.loc[:,["Segment","Sales"]]
states=states.groupby(by=["Segment"]).sum().sort_values(by="Sales")
plt.figure(figsize=(10,7))
sns.barplot(x=states.index,y="Sales",data=states)
plt.xticks(rotation = 90)
plt.xlabel=("SEGMENT")
plt.ylabel=("SALES")
plt.show()
sns.barplot(data['Postal Code'],data['Ship Mode'],hue=data['Region'])
data.corr()
sns.heatmap(data.corr(),annot=True)
Hence The Performance of the Multivariate EDA on the given data set is verified.