breaks = np.asarray(np.percentile(df.MAT, [25, 50, 75, 100]))
df['Class'] = (df.MAT.values > breaks[..., (np.newaxis)]).sum(0)
ax = df.boxplot(column='N0_YLDF', by='Class')
Boxplot stratified by column in python pandas