I am trying to build a box and whisker plots with seaborn. With my min value at '-200,000' and max value at '1,400,000'. Both of these are the outliers. However i only get the graph somewhat similar to a scatter plot.
Below is my code
import pandas as pd
import numpy as np
import xlrd
import matplotlib.pyplot as plt
import seaborn as sns
pi_analysis = pd.read_excel(r'C:\PI\PI Analysis.xlsx',
sheet_name = 'Raw Data'
, header = 0
)
print(pi_analysis)
group_segement= pi_analysis[['Segment', 'TOTAL AMOUNT']].groupby('Segment').sum()
print(group_segement)
group_segement_mean= pi_analysis[['Segment', 'TOTAL AMOUNT']].groupby('Segment')
group_segement_mean.mean().head()
group_segement_mean.describe()
sns.boxplot(x="Segment", y="TOTAL AMOUNT",data=pi_analysis)
Attached is the image. Have tried to change the access. It did not work. Any suggestions how to display the box and whiskers.
New image after changing the scale.
This is code section. However it still does not give me the complete view.
ax=sns.boxplot(x='Segment',y='TOTAL AMOUNT',data=pi_analysis)
ax.set_ylim(-10*10^8,10*10^8)
Regards, Ren.