Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- tags = ['129','30','32','851','9730','9882']
- rows = []
- file = open('D:\python\redi_fix\redi_august.txt','r')
- content = file.readlines()
- for line in content:
- for message in line.split('t'):
- try:
- row_dict = {}
- tag,val = message.split('=')
- if tag in tags:
- row_dict[tag]=val
- rows.append(row_dict)
- except:
- pass
Add Comment
Please, Sign In to add comment