Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Grab percentiles from pandas pipeline output?

I am currently trying this:

context.security_list = context.security_list.sort_values(by = 'roa', ascending=False).quantile(0.70)  

But that doesn't seem to work.
What I want is to grab the top X% or bottom X% of a value in the output pandas.

Thanks,
Sean McKenna