Text-based DataFrame summaries are helpful, but many times, a story can best be told by a visualization. A line chart can quickly communicate a trend over time; a bar graph can distinctly identify unique categories and their counts; a pie chart can represent proportions in an easily digestible manner, and so on. Fortunately, pandas seamlessly integrates with many popular Python data visualization libraries, including Matplotlib, seaborn, and ggplot. In this chapter, we’ll learn how to use Matplotlib to render dynamic charts from our Series and DataFrames. I hope that these visualizations help you add that little spark to your data presentations.
By default, pandas relies on the open source Matplotlib package to render charts and graphs. Let’s install it in our Anaconda environment.
Begin by launching the Terminal (macOS) or Anaconda Prompt (Windows) application for your operating system. The default Anaconda environment, base, should be listed in parentheses to the left. base is the currently active environment.