Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env/python3
- import sys
- import ififuncs
- # accept the csv file
- csv_file = sys.argv[1]
- #process the csv data into a python-friendly format
- data = ififuncs.extract_metadata(csv_file)
- for traffic in data[0]:
- '''
- split each record's traffic entries based on the pipe
- delimiter and then reverse the order
- '''
- #print the reversed order
- print('|'.join((list(reversed(traffic['Traffic'].split('|'))))))
- #print the original order
- print(traffic['Traffic'])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement