Guest User

Untitled

a guest
Jan 23rd, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. +----------------------------------------+---------------+
  2. | URL | Username |
  3. +----------------------------------------+---------------+
  4. | johnsmith/stackoverflow.com/?=abc | johnsmith |
  5. | michealrod/stackoverflow.com/?=payment | michealrod |
  6. | stephaniejean/stackoverflow.com/?=abc | stephaniejean |
  7. +----------------------------------------+---------------+
  8.  
  9. df['exists'] = df.apply(lambda x : df['Username'] in df['URL']).any()
Add Comment
Please, Sign In to add comment