<jupyter_start><jupyter_text><NAME> DSBA Intern @TSF<jupyter_code>import pandas as pd
import numpy as np 
import seaborn as sns
import matplotlib.pyplot as plt
info = pd.read_csv("SampleSuperstore.csv")<jupyter_output><empty_output><jupyter_text>Data Insights<jupyter_code>info.head()
info.info()
info.describe()<jupyter_output><empty_output><jupyter_text>Unique values in each column<jupyter_code>for i in info.columns:
    print(i,len(info[i].unique()))<jupyter_output>Ship Mode 4
Segment 3
Country 1
City 531
State 49
Postal Code 631
Region 4
Category 3
Sub-Category 17
Sales 5825
Quantity 14
Discount 12
Profit 7287<jupyter_text>Checking of null values<jupyter_code>info.isnull().sum()<jupyter_output><empty_output><jupyter_text>Visualisation of data<jupyter_code>sns.pairplot(info)
fig,axes = plt.subplots(1,1,figsize=(12,7))
sns.heatmap(info.corr())
plt.show()
fig,axes = plt.subplots(1,2,figsize=(14,5))
fig.suptitle("Total profit VS Total Sales ")
sns.barplot(data=info.groupby('Sub-Category')['Sales','Profit'].agg(sum),x='Sales',y='Profit',ax=axes[1])
info.groupby('Sub-Category')['Sales','Profit'].agg(sum).plot(kind='bar',ax=axes[0])
plt.xticks(rotation=90)
plt.show()
fig,axes = plt.subplots(1,2,figsize=(14,5))
fig.suptitle("Sales VS Quantity ")
sns.barplot(data=info.groupby('Sub-Category')['Sales','Quantity'].agg(sum),x='Sales',y='Quantity',ax=axes[1])
info.groupby('Sub-Category')['Sales','Quantity'].agg(sum).plot(kind='bar',ax=axes[0])
plt.xticks(rotation=90)
plt.show()
fig,axes = plt.subplots(1,2,figsize=(14,5))
info.groupby('Sub-Category')['Discount','Profit'].agg(sum).plot(kind='bar',ax=axes[0]).set_title('Relation of Discount & Profit based on Sub-Category')
info.groupby('Sub-Category')['Profit','Quantity'].agg(sum).plot(kind='bar',ax=axes[1]).set_title('Relation of Quantity & Profit based on Sub-Category')
plt.xticks(rotation=90)
plt.show()
fig,axes = plt.subplots(2,2,figsize=(16,8))
fig.suptitle("Distribution plots", fontsize=16)
sns.distplot(info['Sales'],ax=axes[0,0])
sns.distplot(info['Profit'],ax=axes[0,1])
sns.distplot(info['Discount'],ax=axes[1,0])
sns.distplot(info['Quantity'],ax=axes[1,1])
plt.show()
fig,axes = plt.subplots(2,2,figsize=(16,8))
fig.suptitle("Sales with different shipping modes and Segments", fontsize=16)
sns.barplot(info['Ship Mode'],info['Sales'],ax=axes[0,0])
sns.lineplot(info['Ship Mode'],info['Sales'],ax=axes[0,1])
sns.barplot(info['Segment'],info['Sales'],ax=axes[1,0])
sns.lineplot(info['Segment'],info['Sales'],ax=axes[1,1])
plt.show()
fig,ax= plt.subplots(1,1,figsize=(12,7))
sns.countplot(info['Quantity'],hue=info['Region'])
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2016647748770337, 'fraction_numerical': 0.03556564510026485, 'mean_word_length': 10.751111111111111, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '260077', 'license': 'MIT', 'n_tokens_mistral': 1131, 'n_tokens_neox': 1039, 'n_words': 137, 'path': 'Exploratory Data Analysis/Exploratory data analysis.ipynb', 'repo_name': 'anish7503/Hacktoberfest-2021', 'size': '2648'}