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.
Rebuilding Google Analytics data - Python Tutorial
From the course: Python for Marketing (2019)
Rebuilding Google Analytics data
- Okay, in this video we are going to rebuild the Google Analytics data frame. It will not contain duplicate indexes and all of the data will be in the proper date format or numerical format that we need for doing analysis on it. To do this, we're going to use a pandas function called merge, so pd.merge, and we're storing pd.merge in new_ga. First, the left data set is the Google Analytics average time on page. Then the right data set is the combination of exit pages, bounce, and page value. That is left and right. We are going to join using an interjoin, and what this will do is it will look inside the index and it will look for matching values. Anything that isn't a matching value gets disregarded. So if in one data frame we have merge#quotaUK/nick, and the other data frame, we don't have that, then the other data frame's data will get dropped. Then we're going to merge left on page and right on page. Essentially what…
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)
Introduction to data wrangling44s
-
(Locked)
Fixing Google Analytics page data4m 17s
-
(Locked)
Preparing data to be grouped2m 39s
-
(Locked)
Creating new datasets with Groupby3m 18s
-
(Locked)
Rebuilding Google Analytics data3m 25s
-
(Locked)
Dropping columns2m 12s
-
(Locked)
Replacing missing Facebook Ad data1m 6s
-
(Locked)
Merging Google Analytics and Search Console1m 50s
-
(Locked)
Saving your data to a CSV46s
-
(Locked)
-
-
-
-
-