Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Import Mailchimp Data with Python & Pandas
from sqlalchemy import create_engine
import pandas as padas
engine = create_engine('postgresql://USERNAME:PASSWORD@HOST:PORT/DATABASE)
joinedQuery = "select mailchimp_report_email_activity.email_address as email, merge_fields_lname as last_name, merge_fields_fname as first_name, action, timestamp from mailchimp_report_email_activity left join mailchimp_list_members on mailchimp_report_email_activity.email_address = mailchimp_list_members.email_address;"
joinedEventsFrame = padas.read_sql_query(joinedQuery, engine)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.