ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/Python/NinoCode/RandomCodeRequests/Narco_reqs.txt
Revision: 480
Committed: Wed Nov 6 19:47:59 2013 UTC (12 years, 4 months ago) by nino.borges
Content type: text/plain
File size: 1185 byte(s)
Log Message:
Adding a file to track quick requests from narco.

File Contents

# Content
1 """ In this project, I was asked to compare teh ssn column to two ssn columns in a separate sheet.
2 I also had to normalize the ssn to look for hyphens"""
3
4 >>> contents = open(r"W:\Manny\Client\Narco\Acclaim New File for OST10242013\Acclaim New File for OST10242013.txt").readlines()
5 >>> masterList = []
6 >>> for line in contents:
7 ... line = line.replace("\n","")
8 ... line = line.split("\t")
9 ... ssn1 = line[10]
10 ... ssn2 = line[11]
11 ... ssn1 = ssn1.replace("-","")
12 ... ssn2 = ssn2.replace("-","")
13 ... if ssn1 == ssn2:
14 ... masterList.append(ssn1)
15 ... else:
16 ... masterList.append(ssn1)
17 ... masterList.append(ssn2)
18 ...
19 >>> len(masterList)
20 231683
21
22
23 contents = open(r"W:\Manny\Client\Narco\PEC_Internal_Report for 1125 CRMC claims - UAT 11.5.2013.txt").readlines()
24
25 checkList = []
26
27 outputFile = open(r"W:\Manny\Client\Narco\PEC_Internal_Report for 1125 CRMC claims - UAT 11.5.2013_Output.txt",'w')
28
29 >>> for line in contents:
30 ... line = line.replace("\n","")
31 ... ssn = line.split("\t")[3]
32 ... if ssn in masterList:
33 ... outputFile.write(line + "\tYES\n")
34 ... else:
35 ... outputFile.write(line + "\tNO\n")
36 ...
37 >>> outputFile.close()