I know that seaborn.countplot has the attribute order which can be set to determine the order of the categories. But what I would like to do is have the categories
order
Most often, a seaborn countplot is not really necessary. Just plot with pandas bar plot:
import seaborn as sns; sns.set(style='darkgrid') import matplotlib.pyplot as plt df = sns.load_dataset('titanic') df['class'].value_counts().plot(kind="bar") plt.show()