From the course: Python for Marketing (2019)
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Import, explore, and plot a basic chart - Python Tutorial
From the course: Python for Marketing (2019)
Import, explore, and plot a basic chart
- [Instructor] Let's begin by importing the libraries we're going to need and plotting a basic visualization. So we're using pandas, so import pandas as pd, import matplotlib.pyplot as plt, import seaborn as sns, and use a magic command matplotlib.inline, so we can plot the charts in our workbooks. I'm also importing warnings, but you probably don't need this. Basically, there's an error message, it keeps coming up on my machine, that I don't need to be seeing. Run this, okay and let's import our data. We are importing the ga_gsc, so that's Google Analytics, Google search console data. We're using Panda's read CSV function. We're passing the fail path, and then we're using these columns. There are columns in there which we do not want to visual. We only want to work with these ones. Now let's inspect this data. Okay, we have float and start in three objects. We should only have one object, so that should be page, but…
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.
Contents
-
-
-
-
-
-
(Locked)
Custom visualizations in Python42s
-
(Locked)
Import, explore, and plot a basic chart4m 48s
-
(Locked)
Creating Matplotlib subplots2m 59s
-
(Locked)
Plotting a secondary y-axis2m 40s
-
(Locked)
Adding x and y labels to a plot2m 40s
-
(Locked)
Rotating xticks labels on plot2m 1s
-
(Locked)
Adding a legend to a plot1m 5s
-
(Locked)
Adding a title to your plot1m 26s
-
(Locked)
Adding annotations to plots3m
-
(Locked)
Switching between Matplotlib styles1m 3s
-
(Locked)
Using a scatter plot in Seaborn1m 8s
-
(Locked)
Customizing a scatter plot in Seaborn2m 21s
-
(Locked)
Creating a Facebook Ads heatmap in Seaborn2m 56s
-
(Locked)
-
-
-
-