Reputation: 1
How to create a bar chart like below chart for below question using Python?
Question: plot job role based on number of individuals who have have master degree AND earn <=50K in the United States
My table is below which I have imported from CSV file.
Degree job rol Country earning Bachelor Admin US. <=50k Master HR. England >=50k
I tried many ways. But could not do it
Upvotes: -1
Views: 101
Reputation: 47
You can import the matplotlib.pyplot as plt
and import numpy as np
to make a bar graph. Create an array called y = np.array([...])
for example, and create a function called plt.bar()
. From there, you can fill in the height and your y variable to create a graph as you desire.
Finally, just type plt.show()
to display the graph.
Upvotes: 0