Email CSV Analysis
These exercises involve analysis of a emails_sent.csv file, which you must download.
Background
The file emails_sent.csv contains information on every email that was sent through my automated emailing software since the beginning of 2018.
The CSV file contains three columns:
User ID
Date and time the email was sent
Subject line of the email
These emails are sent to individuals who interact with me in a number of different ways:
People who subscribed to my general mailing list
People who signed up for a free preview of my Python Morsels subscription service
People who signed up for the paid version of my Python Morsels subscription service
The following information can be gleaned from this data:
All users who subscribed to my newsletter receive an email with the subject line
Welcome to Trey's Weekly Python Chat! I have some things to share with you...All users who sign up for a free preview of Python Morsels receive an email with the subject line
Prepare yourself for a preview of Python MorselsAll users who sign up for the paid version of Python Morsels receive an email with the subject line
Prepare yourself for Python Morsels
Initial Statistics
Create a Python program that reads the emails_sent.csv file and prints the following information from the CSV file:
How many total unique users are there?
How many users subscribed to my newsletter during the captured time frame?
How many users signed up for the free preview of Python Morsels?
How many users signed up for a paid Python Morsels subscription?
To figure out what to filter your data on to answer each of these questions, see the notes on subject lines in the background section above.
Please ask for help if get stuck or you find yourself struggling.
Note
You may need to specify encoding="utf-8" in these exercises when reading this CSV file on a Windows machine.
Free to paid conversions
What percentage of users who signed up for a free Python Morsels subscription eventually also had a paid subscription?
Days to Convert
Of those users who signed up for Trey’s newsletter and then later signed up for a paid Python Morsels subscription, how many days did it take them to convert from “subscribed to newsletter” to “paying for Python Morsels”?
Print out for each applicable user, the number of days it took between signing up for Trey’s newsletter and paying for Python Morsels.
Also print out the average number of days it took to sign up.