I have a dataframe test which has a column company
.
I have another dataframe bsr which has 2 columns, market
and region
, both contain the same data type.
I want to extract the region of each company.
For that I wrote the following code:
test['region'] = [for company in test['company']]
I am not able to get the correct syntax of how to look for that company in the market column of bsr dataframe as key and get it's region as value.
Any help would be appreciated!