What's the of all values above some percentile called? How do I get it in pandas?
I don't think there is a standard library for it.
You can just skip nan value as mean treat them as zero which can mess up the result.
import pandas as pd
df=pd.DataFrame(lst) #For a given list
df[df &gt;= df.quantile(.95)].mean(skipna=True)