Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- df1 = pd.DataFrame({'Team1': ['Black Eagles',
- 'Banana Slugs',
- 'Preachers',
- 'Fighting Cardinals',
- 'The Predators',
- 'Razorbacks',
- 'Rebels',
- 'Fighting Crusaders',
- 'Avengers',
- 'Aztecs']})
- df2 = pd.DataFrame({'Team2': ['Preachers',
- 'Fighting Cardinals',
- 'The Predators',
- 'Razorbacks',
- 'Rebels',
- 'Fighting Crusaders',
- 'Black Eagles',
- 'Banana Slugs',
- 'Avengers',
- 'Aztecs']})
- print(df1['Team1'] == df2['Team2'])
- 0 False
- 1 False
- 2 False
- 3 False
- 4 False
- 5 False
- 6 False
- 7 False
- 8 True
- 9 True
Add Comment
Please, Sign In to add comment