Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- id B C D
- 1 1 1 [1,2,3]
- 2 2 1 [1,2,3]
- 3 0 1 [1,2,3]
- id B C D
- 1 1 1 [1,2,3]
- 2 2 1 [1,2,3]
- In [43]:
- df = pd.DataFrame( {'id':[1,2,3], 'B':[1,2,0], 'C' : [1,1,1], 'D':[[1,2,3], [1,2,3], [1,2,3]]})
- df[df['B'].isin(df['D'][0])]
- Out[43]:
- B C D id
- 0 1 1 [1, 2, 3] 1
- 1 2 1 [1, 2, 3] 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement