Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #!/usr/bin/env/python3
  2. import sys
  3. import ififuncs
  4.  
  5. # accept the csv file
  6. csv_file = sys.argv[1]
  7. #process the csv data into a python-friendly format
  8. data = ififuncs.extract_metadata(csv_file)
  9. for traffic in data[0]:
  10. '''
  11. split each record's traffic entries based on the pipe
  12. delimiter and then reverse the order
  13. '''
  14. #print the reversed order
  15. print('|'.join((list(reversed(traffic['Traffic'].split('|'))))))
  16. #print the original order
  17. print(traffic['Traffic'])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement