text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

sales = pd.read_csv('../input/sales-store-product-details/Salesstore.csv')

sales.columns

sales.shape

sales_id = sales['Order_ID']
sales_pname = sales['Product_Name']
sales = sales.drop(columns='Order_ID')
sales = sales.drop(columns='Product_Name')
sales.columns

num_cols = sales._get_numeric_data().columns
cont_cols = []
for i in num_cols:
    if len(sales[i].unique()) > int(sales.shape[0] / 25):
        cont_cols.append(i)

cat_cols = list(set(sales.columns) - set(cont_cols))
cat_cols

sales.Ship_Mode.value_counts()

sales.Region.value_counts()

corp = sales.loc[sales['Customer_Segment'] == 'Corporate'].count()[0]
cons = sales.loc[sales['Customer_Segment'] == 'Consumer'].count()[0]
hoff = sales.loc[sales['Customer_Segment'] == 'Home Office'].count()[0]
sbiz = sales.loc[sales['Customer_Segment'] == 'Small Business'].count()[0]
explode = (0.1, 0.1, 0.1, 0.1)
labels = ['Corporate', 'Consumer', 'Home Office', 'Small Business']
sales.Customer_Segment.value_counts()

sns.countplot(sales.Product_Category)
sales.Product_Category.value_counts()