I'm trying to calculate quartiles of my column. However any kind of functions i used (So far, i tried with numpy percentile and pandas quantile with interpolation nearest,higher,lower,linear) they always return inaccurate quartile. I checked it from this link here. Is there any function that could really return accurate quartiles or it is probably better to make our own function to accurately count it? Because i have seen in another answer someone created their own function to count it here
This is my column, the result suppossed to be Q1,Q3 = 200,650
but what shows is Q1,Q3 = 200,500
. Whatever the interpolation i used, there's always inacurrate result.
cols = pd.DataFrame({'numbers':[100,300,200,400,500,6000,800,200,200]})