From the course: Customer Insights and Consumer Analytics for Organizations: Tools and Analysis
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Visualize customer behavior with Python
From the course: Customer Insights and Consumer Analytics for Organizations: Tools and Analysis
Visualize customer behavior with Python
- Now that we have a variable that captures all of our data, something that we might want to do is to visualize that data using graphs and using charts. So one of the ways that we can begin to do that is there's a package that if you use Python quite a bit you'll definitely run into this package. It's matplotlib, so we can import matplotlib.pyplot as plt, that just assigns the functionality for pyplot to a variable name and then we'll also want to just run this command in our cell, matplotlib inline, that'll ensure that the graphs that we work to run, the visualizations that we seek to include in our notebooks actually show up in our notebooks as opposed to being cached somewhere else. So let's go 'head and run that. And now let's just go 'head and one of the data points that we have in our data is that attribution score, and so let's just get a census to the shape of that data by running a histogram so I type in plt.hist for histogram, by then paste in the variable name for our data,…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.