I have two data frames. I want to match the elements of wiki_adj with the index value of poss, using a for loop. I am confused on how to loop through both to find matches. Once the match is found, I need to replace items within a column with boss with the corresponding string from wiki_adj.
print(poss.head())
#secondary dataframe with "ind_num" that corresponds to index value of original dataframe
wiki_adj = {
'ind_num':['11','20','25','27','35','41','42','48','49','51','54','56','60','61','62'],
'designation':['Illegal (Decriminalized)','Illegal (unenforced)','Illegal
(unenforced)','Illegal (unenforced)','Illegal
(unenforced)','Legal','Legal','Illegal','Illegal','Illegal
(Decriminalized)','Illegal (Decriminalized)','Illegal
(unenforced)','Illegal','Illegal (Decriminalized)','Illegal
(unenforced)']}
df = pd.DataFrame(wiki_adj)