I have DataFrame:
time_diff avg_trips
0 0.450000 1.0
1 0.483333 1.0
2 0.500000 1.0
3 0.516667 1.0
4 0.533333 2.0
I want to get 1st quartile, 3rd quartile and median for the column time_diff
. To obtain median, I use np.median(df["time_diff"].values)
.
How can I calculate quartiles?