Python Forum
How to parse the data in python
Thread Rating:
  • 3 Vote(s) - 2.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to parse the data in python
#9
cool brother. What about if the string start with JC-PENNY
EX: JCPenney CC JCPTELPAY 092818 1688660513N6008895915763857 - THIS IS ONE STRING ...
for every instance we cant write all functions. so my thinking is I have 800 merchants .. want to scan each row like sql like operator ..
case
when substr(upper(TRAN_STMT_DESC),1,16) IN ('ACORNS.COM ', 'ACORNS INVESTMEN') then 'ACORNS'
when substr(upper(TRAN_STMT_DESC),1,16) ='ACS EXPRESS PAY ' then 'ACS'
when substr(upper(TRAN_STMT_DESC),1,16) ='ACS' then 'ACS'
when substr(upper(TRAN_STMT_DESC),1,4) ='AD&D' then 'AD&D'
when substr(upper(TRAN_STMT_DESC),1,16) ='ADP PAYROLL FEES' then 'ADP'
when substr(upper(TRAN_STMT_DESC),1,16) ='ADP TX/FINCL SVC' then 'ADP'
when substr(upper(TRAN_STMT_DESC),1,12) ='ADT SECURITY' then 'ADT SECURITY'
when substr(upper(TRAN_STMT_DESC),1,16) ='AES ' then 'AES'
when substr(upper(TRAN_STMT_DESC),1,06) ='AFLAC ' then 'AFLAC'
when substr(upper(TRAN_STMT_DESC),1,15) ='ALLIED' then 'ALLIED'
when substr(upper(TRAN_STMT_DESC),1,8) = 'ALLSTATE' then 'ALLSTATE'
when substr(upper(TRAN_STMT_DESC),1,05) ='ALLY 'then 'ALLY Bank/Financial'
when substr(upper(TRAN_STMT_DESC),1,16) ='AM INCOME LIFE ' then 'AM INCOME LIFE'
when ( substr(upper(TRAN_STMT_DESC),1,6) = 'AMAZON' OR substr(upper(TRAN_STMT_DESC),1,15)= 'PAYMENT FOR AMZ' OR substr(upper(TRAN_STMT_DESC),9,6) = 'AMAZON') then 'AMAZON'
when substr(upper(TRAN_STMT_DESC),1,15) ='AMERICAN FAMILY' then 'AMERICAN FAMILY'
when substr(upper(TRAN_STMT_DESC),1,16) ='AMERICAN FUNDS ' then 'AMERICAN FUNDS'
when substr(upper(TRAN_STMT_DESC),1,16) ='AMERICAN GEN LIF' then 'AMERICAN GEN LIF INS'
when substr(upper(TRAN_STMT_DESC),1,16) ='AMERICAN GENERAL' then 'AMERICAN GENERAL'

can this we implement in Python..
actually i am 5 days baby to python , so asking so many questions sorry for that...

my goal: is want to bring terdata table into python .. scan a row and parse the column(remove unwanted data) and send that parsed data into a table ..
Reply


Messages In This Thread
How to parse the data in python - by sandy - Jan-12-2019, 12:35 AM
RE: How to parse the data in python - by stullis - Jan-12-2019, 02:04 AM
RE: How to parse the data in python - by sandy - Jan-13-2019, 10:40 PM
RE: How to parse the data in python - by sandy - Jan-14-2019, 03:22 AM
RE: How to parse the data in python - by stullis - Jan-14-2019, 03:36 AM
RE: How to parse the data in python - by perfringo - Jan-14-2019, 06:25 AM
RE: How to parse the data in python - by sandy - Jan-14-2019, 06:50 AM
RE: How to parse the data in python - by perfringo - Jan-14-2019, 08:49 AM
RE: How to parse the data in python - by sandy - Jan-14-2019, 06:09 PM
RE: How to parse the data in python - by perfringo - Jan-15-2019, 10:21 AM
RE: How to parse the data in python - by sandy - Jan-15-2019, 05:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] Parse Nested JSON String in Python mmm07 4 1,656 Mar-28-2023, 06:07 PM
Last Post: snippsat
  python read iperf log and parse throughput jacklee26 4 2,951 Aug-27-2022, 07:04 AM
Last Post: Yoriz
  How to parse a live feed in Python? Daring_T 2 4,359 Jan-20-2022, 04:17 AM
Last Post: Daring_T
  how to parse data fakka 2 1,547 Sep-22-2021, 10:50 PM
Last Post: bowlofred
  Parse BytesIO data GrahamL 2 2,246 Aug-19-2020, 05:09 PM
Last Post: bowlofred
  Parse a REST API call using Python GKT 1 1,985 May-07-2020, 04:15 AM
Last Post: buran
  command line input (arg parse) and data exchange Simba 7 4,426 Dec-06-2019, 11:58 PM
Last Post: Simba
  Read csv file, parse data, and store in a dictionary markellefultz20 4 4,708 Nov-26-2019, 03:33 PM
Last Post: DeaD_EyE
  Parse data from xml file klllmmm 9 9,727 Jun-25-2019, 05:14 PM
Last Post: heiner55
  Parse the data in XML metadata field klllmmm 2 3,369 Jun-19-2019, 04:24 PM
Last Post: klllmmm

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020