Guest User

Untitled

a guest
Dec 14th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. arr = []
  2. for sub_row in df1['Col']:
  3. for idx, row in df2.iterrows():
  4. if '/' in sub_row:
  5. sub_row= sub_row.split('/')[1]
  6. if sub_row == row['x2']:
  7. arr.append(row['cod'])
  8. elif sub_row == row['x3']:
  9. arr.append(row['cod'])
  10. elif sub_row == row['x4']:
  11. arr.append(row['cod'])
  12. df1['cod'] = cod
Add Comment
Please, Sign In to add comment