How to bar plot in Python
Land Your First Data Science Job
A proven roadmap to prepare for $75K+ entry-level data roles. Perfect for Data Scientist ready to level up their career.
Plotting is one of the fundamental tool of the modern Data Scientist.
Simple plots are made easy using the .plot() from the Pandas library
You will also need to use the matplotlib library
Installing Pandas and Matplotlib
Using Pandas
Pandas do have a little charting library in his toolbox. But will require matplotlib if you want to show it if you are running it from a script.
Here is the simplest example :
You can pass quite a lot of paremeters to the .plot() method.
Such as
- A title as title="My amazing title"
- xlabel as xlabel="x"
- ylabel as ylabel="y"
- the type of chart here wen have kind="bar" default is line
- etc...
Like so :
Here you go ! You know how to make a basic bar plot in Python
Land Your First Data Science Job
A proven roadmap to prepare for $75K+ entry-level data roles. Perfect for Data Scientist ready to level up their career.
Related Articles
Continue your learning journey with these related topics
Master Data Science in Days, Not Months 🚀
Skip the theoretical rabbit holes. Get practical data science skills delivered in bite-sized lessons – Approach used by real data scientist. Not bookworms. 📚