I need to get the statistical data which were generated to draw a box plot in Pandas(using dataframe to create boxplots). i.e. Quartile1,Quartile2,Quartile3, lower whisker value
One option is to use the y data from the plots - probably most useful for the outliers (fliers)
_, bp = pd.DataFrame.boxplot(df, return_type='both')
outliers = [flier.get_ydata() for flier in bp["fliers"]]
boxes = [box.get_ydata() for box in bp["boxes"]]
medians = [median.get_ydata() for median in bp["medians"]]
whiskers = [whiskers.get_ydata() for whiskers in bp["whiskers"]]
But it's probably more straightforward to get the other values (including IQR) using either
quantiles = df.quantile([0.01, 0.25, 0.5, 0.75, 0.99])
or, as suggested by WoodChopper
stats = df.describe()