Sayyed Mosawi
Sayyed Mosawi

Reputation: 1

Create Bar Chart

How to create a bar chart like below chart for below question using Python?

Chart

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

Answers (1)

Ray953
Ray953

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

Related Questions