I have two different dataframes and I need to add informatio of one dataframe into another basede on a column where they share the same values.
Something like this:
DF1:
Invoices | Client | Product | Product type |
---|---|---|---|
00000001 | AAAAAA | A1a1 |
DF2:
Product | Product type | Product description |
---|---|---|
A1a1 | Type A1 | description of the product |
The first Dataframe is a list of all invoices over the last year, which has one row for each product in that invoice, I need to add the "Product type" from DF2 on DF1 for each product.
I've tried to use the merge function but it adds the column and that's not what I need to do.
I need to compare the "Product" columns on both DFs and when the value is the same populate DF1 "Product" with DF2 "Product" value.