Let's say I have a DataFrame that I get weekly and would like to update a tracker that is updated based on a weekly report, for example:
This is a weekly report I receive:
ID Cost
X12 500
X54 100
X52 150
X45 200
X32 435
I have a DataFrame for the main metric tracker, that needs to be updated based on the weekly report:
ID Cost
X12 34
X54 467
X52 234
X45 3453
X37 4664
X76 34
X57 467
X52 23465
X48 547
X32 34
I would like to take the numbers from DataFrame 1 and put them into DataFrame 2, which would result in:
ID Cost
X12 500
X54 100
X52 150
X45 200
X37 4664
X76 34
X57 467
X56 23465
X48 547
X32 435
How would I go about performing a function like this, from one DataFrame onto another. I assume we use a for loop and search through the second DataFrame while iterating through the first, but how would I set this up?
Thanks!