Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. df = pd.DataFrame(data={'text':['abc def', 'def ghi', 'poi opo', 'aswwf', 'abcs sd'], 'id':[1, 2, 3, 4, 5]})
  2.  
  3. Out [1]:
  4. text id
  5. 0 abc def 1
  6. 1 def ghi 2
  7. 2 poi opo 3
  8. 3 aswwf 4
  9. 4 abcs sd 5
  10.  
  11. search = ['abc', 'poi']
  12.  
  13. Out [2]:
  14. text id
  15. 0 abc def 1
  16. 1 poi opo 3
  17. 2 abcs sd 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement