-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFEC
18 lines (10 loc) · 881 Bytes
/
FEC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
awk -F'|' '$9 ~ /AUSTIN/' itcont.txt >> austin_donors.txt
awk -F'|' 'NR==FNR{a[$8];next} $8 in a{print $0}' wendydonors.txt itcont.txt > what.txt
#!/bin/usr/python3
import pandas as pd
import re
df_1= pd.read_csv('itcont.txt', sep='|', index_col=False, names=['CMTE_ID','AMNDT_IND','RPT_TP','Transaction_PGI','Image_num', 'Transaction_TP', 'Entity_TP','NAME','City','State','Zip_code','Employer','Occupation','Transaction_DT','Transaction_AMT','Other_ID','Tran_ID','File_NUM','MEMO_CD','Memo_text','Sub_ID'])
df_1=pd.read_fwf('itcont.txt', delimiter='|')
df_1.columns=['CMTE_ID','AMNDT_IND','RPT_TP','Transaction_PGI','Image_num', 'Transaction_TP', 'Entity_TP','NAME','City','State','Zip_code','Employer','Occupation','Transaction_DT','Transaction_AMT','Other_ID','Tran_ID','File_NUM','MEMO_CD','Memo_text','Sub_ID'])
df_2 = df_1.loc[df_1['City']=='AUSTIN']