Solve the TypeError no numeric data to plot in Pandas

In today’s tutorial we’ll learn how to troubleshoot a common plotting error that you might encounter when working in Pandas and trying to plot your data during its pre processing for data analysis. Reproducing the problem In order to reproduce the error, we will first construct a very simple DataFrame. Your Python development environment (Jupyter, … Read more

How to add a legend in a Matplotlib chart?

In today’s hands on data visualization tutorial we’ll learn how to insert a legend into an existing chart. Rendering a Matplotlib chart We’ll use Python and the Matplotlib library to draw a simple line chart. In our example we would like to show the revenue from B2B vs B2C sales of an imaginary company during … Read more

How to save a chart figure in Matplotlib and Seaborn?

In today’s data visualization tutorial we’ll learn how to save a Matplotlib plot as a graphic file so you can later on embed into a website, presentation, Excel spreadsheet or documents. Creating our Matplotlib chart We’ll first go ahead and create our plot using Python and Matplotlib. Note that we’ll also use Numpy to generate … Read more

How to create a Scatter plot in Pandas with Python?

In this Data Visualization tutorial we’ll learn how to quickly render and customize custom charts using Python and the Pandas library. It’s important to note that the Pandas plotting capabilities are a subset from those available in Matplotlib, a powerful Data Visualization library, which we have covered in other tutorials. Python scatter plots example – … Read more