Code

Seaborn Countplot

A countplot counts number of occurences in a certain category. Using the built in tips dataset, here is how to create a countplot of sex.

# import the seaborn libaray import seaborn as sns # reading the dataset df = sns.load_dataset('tips') # create countplot sns.countplot(x ='sex', data = df)
Image 0

0

1

Updated 2021-06-21

Tags

Python Programming Language

Data Science