Q:

python - vlookup in pandas applying %LIKE%

I am new to Python, and I am trying to join two CSV files (delimited by ";")
CSV1
Sender;Recipient
Adam;123
Alex;234
John;123
Adam;888

CSV2
Name;Phone
Winnie;123,234,456
Celeste;777,888,999

Intended Output:
Sender;Recipient;RecipientName
Adam;123;Winnie
Alex;234;Winnie
John;123;Winnie
Adam;888;Celeste

Phone in CSV2 is separated by comma(s).  So I need to do some kind of search or %LIKE% when I am matching. 
I know I can use join to do a vlookup type but how can I achieve the %LIKE%? 

A:

Use str.split to turn Phone column into lists
Use str.len() to find the length of each of those lists.   We'll use this to explode the 'Name' column
Push all those lists together into one.   Make sure to filter out zero length lists
Use repeat to explode 'Name'
Create a dictionary where keys are phone numbers and values are names
Create a copy of d1 where we've added the new column using map and the new dictionary we made. 

p = d2.Phone.str.split(',')
p = p[p.astype(bool)]
l = p.str.len()
p2 = np.concatenate(p.values).astype(int)
nm = d2.Name.repeat(l)
m = dict(zip(p2, nm))

df = d1.assign(RecipientName=d1.Recipient.map(m))
print(df)

  Sender  Recipient RecipientName
0   Adam        123        Winnie
1   Alex        234        Winnie
2   John        123        Winnie
3   Adam        888       Celeste

df.to_csv('out.csv', sep=';', header=None)

Sender;Recipient;RecipientName
Adam;123;Winnie
Alex;234;Winnie
John;123;Winnie
Adam;888;Celeste

