pandas boxplot sort by median code example
Example: how arrange order of boxplots matplotlib
category_order_by_mean_salary = train.groupby('Category')['Salary'].mean().order().keys()
category_order_by_mean_salary = train.groupby('Category')['Salary'].mean().order().keys()