Answers for "seaborn countplot palette"

1

list of seaborn color palette

sns.color_palette("rocket", as_cmap=True)
Posted by: Guest on October-06-2020
0

seaborn countplot

## for single column
sns.countplot(y=df.col)

## for multiple columns
fig, ax = plt.subplots(1, 3, figsize=(25, 10))
fig.suptitle('Count Plot', fontsize=16, y=0.92)

columns = ['Income', 'Age', 'Purchased']
for i, col in enumerate(columns):
    graph = sns.countplot(y=df[col], ax=ax[i])
    ax[i].set_title(*[col])
    graph.bar_label(graph.containers[0])
Posted by: Guest on October-21-2021

Python Answers by Framework

Browse Popular Code Answers by Language