-1

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

  • 1
    Can you show us what you tried? Without any code or a sample of your data, it's not possible to help you – Derek O Feb 18 '23 at 02:06

1 Answers1

0

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.

Ray953
  • 47
  • 5