Try to search your question here, if you can't find : Ask Any Question Now ?

Calculating Quantiles based on a column value?

HomeCategory: stackoverflowCalculating Quantiles based on a column value?
Avatarpragati asked 5 months ago

I am trying to figure out a way in which I can calculate quantiles in pandas or python based on a column value? Also can I calculate multiple different quantiles in one output?

For example I want to calculate the 0.25, 0.50 and 0.9 quantiles for

Column Minutes in df where it is <= 5 and where it is > 5 and <=10

    df[df['Minutes'] <=5]

    df[(df['Minutes'] >5) & (df['Minutes']<=10)]

where column Minutes is just a column containing value of numerical minutes

Thanks!

1 Answers
Best Answer
AvatarJyoti answered 5 months ago
Your Answer

4 + 10 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com