Created
December 31, 2022 19:02
-
-
Save minhkstn/915292fcec64eced3d87f9706264c01a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import matplotlib.pyplot as plt | |
# get input data | |
df = pd.read_csv('./gdp_capita.csv') | |
ax = df.plot.bar(x='Year', width=0.8) | |
ax.set_ylabel('GDP/capita (USD)') | |
for container in ax.containers: | |
ax.bar_label(container) | |
plt.tight_layout() | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment