Created
February 7, 2017 04:52
-
-
Save Keiku/af21ca966b4ecb70c0b4cf55862d432d to your computer and use it in GitHub Desktop.
Check intersection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
df1 = pd.DataFrame({'id': [1, 2, 3]}) | |
df2 = pd.DataFrame({'id': [2, 3, 4]}) | |
set(df1.id).intersection(set(df2.id)) | |
# Out[73]: {2, 3} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment