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
Year | Item 1 | Item 2 | |
---|---|---|---|
1990 | 5 | 2 | |
1995 | 7 | 4 | |
2000 | 10 | 6 | |
2005 | 12 | 8 | |
2010 | 15 | 10 | |
2015 | 18 | 12 | |
2020 | 22 | 14 |
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
Year | Item 1 | |
---|---|---|
1990 | 5 | |
1995 | 7 | |
2000 | 10 | |
2005 | 12 | |
2010 | 15 | |
2015 | 18 | |
2020 | 22 |
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 necessary libraries | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
# get input data | |
df = pd.read_csv('./data.csv') | |
ax = df.plot(x='Year', y='Item 1', | |
kind='bar') | |
ax.set_ylabel("Price (USD)") |
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 necessary libraries | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
# get input data | |
df = pd.read_csv('./data.csv') | |
ax = df.plot(x='Year', y='Item 1', | |
kind='bar') | |
ax.set_ylabel("Price (USD)") |
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') | |
ax.set_ylabel('GDP/capita (USD)') | |
plt.tight_layout() | |
plt.show() |
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: |