I have the following code that is currently displaying the group bar chart.
pd.crosstab(train_data['workclass'],train_data['income']).plot(kind="bar") plt.xlabel('Workclass') plt.ylabel('Income Count') plt.suptitle("Training Data: Workclass vs Income", fontweight="bold")
The current chart looks like this:
I want to display the chart by sorting the orange section (income
>50K) in descending order. So the tallest orange bar should be on the left side. How do I do that?