Python: Sum values if criteria is met over 2 dataframes

Viewed 24

I have 2 dataframes and I want to sum the values held in the "Amount" column if "URN", "Updated Sub Category" values match and the "Date" in tcv_keys is AFTER the "Date" in fw_keys.

I would like to add the sum amount to a new column in tcv_keys called "Total Sum."

I've looked at a mask technique but can't get it to work for my date criteria.

Could anyone help?

dataframe datatypes

0 Answers
Related