Question

Python programming- Download the following two files you will need for this activity: customerData.csv This file...

Python programming-

Download the following two files you will need for this activity:

customerData.csv

This file contains randomly generated fictitious customer data.

customer_regex.py

This is a Python script that imports the customer data into a list of customer details.

In your personal playground in Codio, upload the two files and investigate the contents before considering the task you will pose to your peers.

Assume the position of a manager of an online retailer. Pose a question to your IT expert about a task you would like to do with the customer data files. Provide a brief explanation (two to three sentences) describing why this task might be relevant. Examples of tasks you may pose include the following:

Correct data errors

Normalize the format of data

Search for certain customers based on a business need

Identify trends based on frequency of the customers

In your responses to your peers:

Provide the regex code that would be required to meet the task presented.

My classmate asked that I would like to know more about my customers. Knowing what gender the majority of my customers are tells me how I should advertise and where I might be able to get more customers. My question is how many female vs male customers do we have?

Here is the code from the first link:

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"])

customerdata.csv is a large file, I will simply copy and paste a small section of it, enough to answer the question:

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) 9.47E+09 Indiana 82439-3619 [email protected] Visa 4263xxxxxxxx1913 23-Sep female WMMZ 4 ######## 7 ######## 9 ########
Dr. Jorge Leonard male 267-90-8144 ######## (482) 962-5537 Pennsylvania 44795 [email protected] American Express 3430xxxxxxx6344 22-Jun male WLRS 4 ######## 5 ######## 15 ########
Sue Robertson female 431-17-5882 Fri Jun 03 2016 01:34:30 GMT-0400 (Eastern Daylight Time) (387) 395-7066 Virginia 97198 [email protected] American Express 3446xxxxxxx4624 21-Sep female WING 4 ######## 9 ######## 13 ########
Gilbert Houston male 469-80-8860 Wed May 02 2012 00:45:29 GMT-0400 (Eastern Daylight Time) 5.78E+09 Kentucky 59108-0390 [email protected] Mastercard 5149xxxxxxxx7215 26-Jul male WOGV 0 $0 5 ######## 6 ########
Randy Griffith male 936-86-6880 2/4/2006 (310) 611-5796 Delaware 22646-1080 [email protected] Diners Club United States & Canada 5430xxxxxxxx1269 22-Jan male WJMP 4 ######## 8 ######## 10 ########
Lucile Bishop female 443-08-6297 Tue May 31 2016 06:26:56 GMT-0400 (Eastern Daylight Time) (808) 609-2200 Utah 57189-7317 [email protected] Discover Card 6011xxxxxxxx4095 25-Mar female KACJ 1 $869.04 5 ######## 6 ########
Mr. Shane Hughes male 278-42-7591 ######## 3.36E+09 Pennsylvania 67098-3590 [email protected] Visa 4694xxxxxxxx8259 23-Jun male WJTV 2 ######## 7 ######## 8 ########
0 0
Add a comment Improve this question Transcribed image text
Answer #1

As Gren data The udpe e data, the quickes woy, mast litely l be to tege the cocuntor c lass mat tommon methad the counter clSompe out aut 935 ) ) ol! buhr MNA 40 Vaash Thriee fauaoite vodio Statond: WMM2 NLRS Process finishad Wth exit code o so 1in

Add a comment
Know the answer?
Add Answer to:
Python programming- Download the following two files you will need for this activity: customerData.csv This file...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Information requested: The company has decided to increase the security of our client's privacy by storing...

    Information requested: The company has decided to increase the security of our client's privacy by storing our SSN #s in a separate, encrypted database. The current database needs to have the SSN #s replaced with the format XXX-XX-####, so that the last four digits are still accessible for customer identity verification. 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...

  • Create a cause and effect diagram for the following case: Case Study Eastern Gear,Inc.: Job Shop...

    Create a cause and effect diagram for the following case: Case Study Eastern Gear,Inc.: Job Shop Eastern Gear, Inc., in Philadelphia, Pennsylvania, is a manufacturer of custom-made gears ranging in weight from a few ounces to over 50 pounds. The gears are made of different metals, depending on the customer's requirements. Over the past year, 40 different types of steel and brass alloys have been used as raw materials. See Exhibit 1 for details. be necessary to stop production and...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT