pandas groupby 50 quantile code example Example: pandas groupby percentile df.groupby('C').quantile(.95)