I have two dataframes with similar records and yet the customer have different roles in each table. I wonder if it's possible to update the "CUST_ID" in the "customer_df2" dataframe with the "customer_df1" dataframe. I have been digging through the internet and yet couldn't find any solutions.
import pandas as pd
customer_data_1 = {'TRANSACTION_ID':['001','002','003'],
'NAME':['Amy','Amy','Amy'],
'CUST_ID':[100,100,100],
'ROLE':['APPLICANT','APPLICANT','APPLICANT']}
customer_df1 = pd.DataFrame(customer_data_1)
customer_data_2 = {'TRANSACTION_ID':['B001','B002','B003'],
'NAME':['Amy','Amy','Amy'],
'CUST_ID':[None,None,None],
'ROLE':['BENEFICIARY','BENEFICIARY','BENEFICIARY']}
customer_df2 = pd.DataFrame(customer_data_2)