I'm new to pandas so likely overlooking something but I've been searching and haven't found anything helpful yet.
What I'm trying to do is this. I have 2 dataframes. df1
has only 1 column and an unknown number of rows. df2
has an unknown number of rows also and also an unknown number of columns for each index.
Example:
df1:
0 1117454
1 1147637
2 1148945
3 1149662
4 1151543
5 1151545
6 1236268
7 1236671
8 1236673
...
300 1366962
df2:
1 2 3 4 5 6 7
8302813476 1375294 1375297 1375313 1375318 1375325 1375330 1375331
8302813477 1317422 1363270 1363288 1363262 None None None
8302813478 1187269 1187276 1149662 1147843 1147639 1236650 1236656
So what I want is to check all df1
values against df2
column 1 - n and if there is a match with any value in df1
mark the index of df2
as True else it is False.