I have a dataframe A which contains mapping of "reason_name" column to Yes, no, unfinished via "Yes/No/Unfinished" column.
I need to compare the "reason_name" column of dataframe A with that of dataframe B and then create a third column "donation_status" in dataframe B which will contain the corresponding row value of "Yes/No/Unfinished" column based on comparison
I want something like the screenshot below but make the rows sorted on ascending order of date and then ascending order of time:
I am trying the following code:
aggregated_call_logs_df["donation_status"] = aggregated_call_logs_df.reason_name.map(mapping_reason_name_donation_status_df)
However, I get the following error:
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
NOTE: I filled the nan values to empty string.