Order categories by count in a countplot
This functionality is not built into seaborn.countplot as far as I know – the order parameter only accepts a list of strings for the categories, and leaves the ordering logic to the user. This is not hard to do with value_counts() provided you have a DataFrame though. For example, import pandas as pd import seaborn … Read more