Data Visualization using pandas

Premium

Beyond simply listing counts and unique values, visualization can greatly aid in comprehending the categorical distribution. Plots can reveal outliers or data errors that aren't always obvious in tables.

We will plot the sector counts that we calculated earlier.

1# Visualize the sector distribution
2sector_counts.plot(kind='bar')
3
Sector Distribution
Sector Distribution

Let’s also create some visualizations on our stocks data. We can plot a time series of closing stock prices of Qualcomm using the following line of code:

Unlock Premium Content

Upgrade your account to access the full article, downloads, and exercises.

You'll get access to:

  • Access complete tutorials and examples
  • Download source code and resources
  • Follow along with practical exercises
  • Get in-depth explanations