From the course: Python Data Science Mistakes to Avoid

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Not using the right visualization type

Not using the right visualization type - Python Tutorial

From the course: Python Data Science Mistakes to Avoid

Start my 1-month free trial

Not using the right visualization type

- [Instructor] When visualizing data, a common mistake to avoid is not choosing the right type of visualization. I'll be walking through some examples to demonstrate how to select the right type of visualization for your goal. Let's say that I have a variable named grades containing a Canvas data frame, and the data frame consists of student scores across five exams. I've displayed it here. Now, say I want to visualize the distribution of students' exam grades. If I choose to use a bar plot, I will have trouble achieving my goal, as bar plots are meant for visualizing categorical data. Instead, I can use a histogram, as histograms are met for visualizing quantitative data, specifically distributions. I can call the hist function from matplotlib's pyplot sub-module and pass in the grade column from the grades data frame. It would look something like this. There we go. To avoid choosing the wrong type of visualization,…

Contents