Python Forum
quartile and average - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: quartile and average (/thread-32762.html)



quartile and average - dawid294 - Mar-04-2021

Hello i need help with quartile in python

I have this data and i would like to create quartile from column NUMBER and average values from column expected. I can created quartile with this code


#df.number.quantile([0.25,0.5,0.75])

but i do not know how can i create average values from expected to one table.

I would like to something like this:

quartile from number average from expected
25,00% -0,881719294 30
50,00% -0,621781704 190,44
75,00% -0,475562233 160,29



expected NUMBER
0 -2,067300424
20 -1,898235654
30 -1,199720358
0 -1,186361029
100 -0,991238111
10 -0,845213021
0 -0,834410757
0 -0,807705753
0 -0,696648457
1744,4 -0,671328708
0 -0,5722347
0 -0,545097796
0 -0,510838795
500 -0,505579028
0 -0,475665485
0 -0,475252476
0 -0,442879647
20 -0,439713515
0 -0,432110962
80 -0,40751008