# What does pandas describe() percentiles values tell about our data?

Let say this is my dataframe

x=[0.09, 0.95, 0.93, 0.93, 0.34, 0.29, 0.14, 0.23, 0.91, 0.31, 0.62,
0.29, 0.71, 0.26, 0.79, 0.3 , 0.1 , 0.73, 0.63, 0.61]

x=pd.DataFrame(x)


When we x.describe() this dataframe we get result as this

>>> x.describe()
0
count  20.000000
mean    0.50800
std     0.30277
min     0.09000
25%     0.28250
50%     0.47500
75%     0.74500
max     0.95000


What is meant by 25,50, and 75 percentile values? Is it saying 25% of values in x is less than 0.28250?

• I have updated my answer. I'll be glad if you take a look since I assume my previous illustration was misleading. – Fatemeh Asgarinejad May 27 '19 at 7:32

It describes the distribution of your data. 50 should be a value that describes „the middle“ of the data, also known as median. 25, 75 is the border of the upper/lower quarter of the data. You can get an idea of how skew your data is. Note that the mean is higher than the median, which means your data is right skewed.

Try:

import pandas as pd
x=[1,2,3,4,5]
x=pd.DataFrame(x)
x.describe()


First, seemingly, the describe table is not the description of your array x.

then, you need to sort your array (x), then calculate the location of your percentage ( which in .describe method p is 0.25, 0.5 and 0.75),

sorted_x = [0.09, 0.1 , 0.14, 0.23, 0.26, 0.29, 0.29, 0.3 , 0.31, 0.34, 0.61, 0.62, 0.63, 0.71, 0.73, 0.79, 0.91, 0.93, 0.93, 0.95]

and the element in the which is located in 25th percentage is achieved when we divide the list to 25 and 75 percent, the shown | is 25% here:
sorted_x = [0.09, 0.1 , 0.14, 0.23, 0.26,**|** 0.29, 0.29, 0.3 , 0.31, 0.34, 0.61, 0.62, 0.63, 0.71, 0.73, 0.79, 0.91, 0.93, 0.93, 0.95]

So the value is calculated as $$0.26 + (0.29-0.26)*\frac{3}{4}$$ which equals $$0.28250000000000003$$