I'm very new to Python. How can I match one text dataframe to another? (kindly please edit this question if I ask this wrongly)
For example given this input data:
df1 =
id Names
0 123 Simpson J.
1 456 Snoop Dogg
df2 =
Names
0 John Simpson
1 Snoop Dogg
2 S. Dogg
3 Mr Dogg
Is there a way I could find (maybe using findall
or match
, or any python packages) so that I could produce how many times the names with the id has appeared which almost like this result:
result =
id Names_appeared
0 123 1
1 456 3
Looking for a brief explanation and some URL to help me understand.