Guest User

Untitled

a guest
Feb 24th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. df.loc[df.location.str.contains('CA'), 'location'] = 'USA'
  2.  
  3. df.loc[df.location.isin(state_list), 'location'] = 'USA'
  4.  
  5. for states in state_list:
  6. if df.loc[df.location.isin(state_list)]:
  7. df['location'] = 'USA'
Add Comment
Please, Sign In to add comment