Micko81

Untitled

Jun 25th, 2017
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. import pandas as pd
  4.  
  5. def getFullPath2(x):
  6.   ret = ''
  7.   for i in range(150,0,-1):
  8.     ret += str(x['Res' + str(i)])
  9.   return ret
  10.  
  11. def getPath2(x):
  12.   line = x.split('|')
  13.   a = line[0]
  14.   b = line[1]
  15.   c = line[2]
  16.  
  17.   if b == 'ret1':
  18.     return 'A'
  19.   elif b == 'ret2':
  20.     if c.startswith('B_'):
  21.       return 'B'
  22.     elif c.startswith('C_'):
  23.       return 'C'
  24.     elif c.startswith('A_'):
  25.       if a.startswith('D_'):
  26.         return 'D'
  27.       else:
  28.         return 'E'
  29.   else:
  30.     return 'F'
Add Comment
Please, Sign In to add comment