Question: Information requested: I would like gross sales by area code. This information will be helpful in planning future telemarketing campaigns. Assignment: Provide the regex code

Information requested:

I would like gross sales by area code. This information will be helpful in planning future telemarketing campaigns.

Assignment:

Provide the regex code that would be required to meet the task presented. Describe the relevance of the task: Were regular expressions the best or only way to approach the task? What other data or tasks could be used to increase effectiveness or better achieve the goal presented?

Python Code:

import csv import re data = []

with open('customerData.csv') as csvfile: reader = csv.DictReader(csvfile) for row in reader: data.append(row) print(data[0]) print(data[1]["Name"]) print(data[2]["Spent Past 30 Days"])

CSV File Information:

Name Gender SSN Member Date Phone State Zip Email Credit Card Credit Card_Number Credit Card Exp Gender Favorite Radio Station Purchases Past 30 Days Spent Past 30 Days Purchases Past 6 Months Spent Past 6 Months Purchases Past 12 Months Spent Past 12 Months
Mamie Mason female 459-69-6647 Mon Aug 01 2016 12:06:01 GMT-0400 (Eastern Daylight Time) 9472284457 Indiana 82439-3619 m.masonason@gig.org Visa 4263xxxxxxxx1913 23-Sep female WMMZ 4 $2,149.81 7 $5,188.75 9 $10,756.50
Dr. Jorge Leonard male 267-90-8144 10/17/2015 (482) 962-5537 Pennsylvania 44795 j.leonardeonard@leiwauhi.gov American Express 3430xxxxxxx6344 22-Jun male WLRS 4 $1,510.68 5 $3,679.59 15 $11,241.27
Sue Robertson female 431-17-5882 Fri Jun 03 2016 01:34:30 GMT-0400 (Eastern Daylight Time) (387) 395-7066 Virginia 97198 s.robertsonobertson@odejo.co American Express 3446xxxxxxx4624 21-Sep female WING 4 $2,094.67 9 $6,289.29 13 $11,071.11
Gilbert Houston male 469-80-8860 Wed May 02 2012 00:45:29 GMT-0400 (Eastern Daylight Time) 5776043558 Kentucky 59108-0390 g.houstonouston@fuzsi.co Mastercard 5149xxxxxxxx7215 26-Jul male WOGV 0 $0 5 $3,167.44 6 $6,928.30

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!