SHARE
TWEET

Untitled

a guest Oct 13th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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'])
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top