Question: I am working on an assignment where I have two csvs. CSV1 contains a list of email addresses and CSV2 contains all order data including

I am working on an assignment where I have two csvs. CSV1 contains a list of email addresses and CSV2 contains all order data including customer email address. How could I use python to match the email addresses from CSV1 to those in CSV2 and create a new column with 0 for No Match and 1 for Match. I'd prefer to use Python for this but R code in addition to Python would be helpful. Ex. CSV1

abc@g**ail.com

123@hot***l.com

bcd@a**.com Ex. CSV2

Columns: Order ID, Order Date, Customer Name, Customer Email Address, Customer Shipping Address, Total Order Amount, Products Ordered.

Essentially I want to add a new column to CSV1 containing binary response of 0 (No Match) and 1 (Match) indicating whether the email address in CSV1 is present in CSV2.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!