My goal is to compare a DataFrame row to every item in a 2D array list. 

**Here is my list = mylist**

```
1       2000
2       2000a
3       2000b

```

**Here is my Dataframe = df**

```
RPN      Source       city  
1       netflix       baltimore
1       netflix       baltimore
2       hulu          orlando
4       hulu          houston

```

As explained above, I would like to create a new column from a list that compares each RPN in my DataFrame to the first position of mylist. If RPN is in mylist, take the second position of the array associated with it and append it to the a list to be joined to the data frame. If not found just use RPN. 

**DESIRED OUTPUT**

```
RPN      Source          city           npi
1       netflix       baltimore        2000
1       netflix       baltimore        2000
2       hulu          orlando          2000a
4       hulu          houston            4

```

Here my code below, it works, however I am only getting RPN for every record, not the NPI associated that RPN in mylist

```
#Seperates Portico from Facets, FEP, Nasco, ETC
portico = df[df['SOURCE'] == 'PORTICO']
comparelist = []

#creates a list of RPN and NPI
mylist = portico[['RPN','NPI']].values.tolist()       
for index,x in df.iterrows():
        RPN = x['RPN']
        for a in mylist:
            if RPN in a:
                comparelist.append(a)
            else:
                comparelist.append(RPN)
            break
    df = df.drop(columns = ['NPI'])
    df['NPI'] = comparelist

```

**CURRENT OUTPUT**

```
RPN      Source          city           npi
1       netflix       baltimore        1
1       netflix       baltimore        1
2       hulu          orlando          2
4       hulu          houston          4

```