Skip to Content
Python in Excel Step-by-Step
book

Python in Excel Step-by-Step

by David Langer
January 2026
Beginner to intermediate
272 pages
6h 31m
English
Wiley
Content preview from Python in Excel Step-by-Step

Chapter 9Data Visualization

In this chapter you continue with the AdventureWorks data analysis scenario by learning how to use one of Python in Excel’s most powerful capabilities: visually analyzing data.

As you will see in this chapter, Python in Excel can produce charts (i.e., data visualizations) that are difficult, or impossible, to replicate using out-of-the-box Excel features.

9.1 INTRODUCING PLOTNINE

Like Microsoft Excel, Python has rich support for crafting data visualizations that help you analyze data and tell data stories. Over the years, many Python libraries have been built for visualizing data. Examples include the matplotlib and seaborn libraries.

Data visualization is so important in real-world analytics that the pandas library also offers charting functionality (e.g., creating a bar chart of a column). However, in this chapter you learn about my go-to library for data visualizations with Python in Excel – the mighty plotnine.

As a quick aside on terminology, I treat the terms chart, visual, visualization, and data visualization as synonymous in this chapter.

One of the goals of the plotnine library is to produce print-quality visualizations (e.g., for academic journals). This means that plotnine is very flexible and offers a lot of control over your data visualizations – far more than provided by Excel charts.

This is important to note because when I teach plotnine I often get asked, “Dave, can I use plotnine to do X?” The answer is plotnine can do just ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Python for Excel

Python for Excel

Felix Zumstein

Publisher Resources

ISBN: 9781394340767Purchase Link