/ABTesting-withAggregatesInPandas

This project uses aggregate measure in Pandas to help a company select the best performing ad in an AB test

ABTesting-withAggregatesInPandas

This CodeCademy project uses aggregate measures in Pandas to analyze data and help a company select the best performing ad in an AB test. There are two different versions of an ad, which have been placed in emails and banner ads on Facebook, Twitter, and Google. The company wants to know how the two ads are performing on each platform on each day of the week.

Before manipulating the data, I inspect the first few lines of the initial dataframe. AB1

Next I use .groupby() and .count() to show the number of ad clicks that came from each UTM source AB2

I then create a new column that will indicate if the ad is clicked as a boolean value. If the value is True, then the ad was clicked.
Next, I pivot the table so it is easier to analyze the data. AB3

After pivoting the table, I add new column to more clearly show the percent of users that clicked each add from each UTM source

AB4

To better understand the numbers in the table, I used .groupby() and .count() to show the count of users in each experimental group (A & B). I found that there are 827 users in each group. Next I sorted input from each group into False or True where True indicates that the ad was clicked on AB5

To analyze the AB test, I initialized two new databases that contain only the information from each group. After that I created tables to clearly show how each test performed on each day of the week. AB6

By examining both sets of data, one can see that clicks for ad A is higher on every day of the week except for Tuesday, so overall, A is the better ad.