Seaborn

Seaborn is a Python data visualization library creating elegant visualizations for statistical exploration and insight.

To import seaborn

import seaborn as sns

Plotting Bars with Seaborn

We can plot bars with sns.barplot() function. This function takes 3 keywords:

  • data: a Pandas DataFrame that contains the data
  • x: column in the DataFrame contains otheur x-labels
  • y: column in the DataFrame contains the heights
# Load csv
df = pd.read_csv('data.csv')
sns.barplot(
	data=df,
	x='Year',
	y='Population'
)
plt.show()