I have two csv file like below.
In 'order.csv'
date orderName orderNumber
1/7 Tom 1
1/7 Jeny 4
1/7 Brown 2
1/7 Tom 3
1/8 Sky 5
1/8 Blue 7
1/8 Red 6
1/8 Wine 8
1/9 Tom 9
1/9 Earth 11
1/9 Earth 10
In 'run.csv'
date runName runNumber
1/7 Tom
1/7 Jeny
1/7 Tom
1/7 Brown
1/8 Sky
1/8 Blue
1/8 Red
1/8 Wine
1/9 Tom
1/9 Earth
1/9 Earth
My goal is that the orderNumber has to go inside of runNumber matching the date and orderName. But the thing is that the order is different between order and run csv. And if the orderName is duplicated on the same date. It doesn't have to considerate.
In 'result.csv'
date runName runNumber
1/7 Tom
1/7 Jeny 4
1/7 Tom
1/7 Brown 2
1/8 Sky 5
1/8 Blue 7
1/8 Red 6
1/8 Wine 8
1/9 Tom 9
1/9 Earth
1/9 Earth
How can I make using methods of python for this case?
I tried to do something but for me it's too hard problem.
So I asked here entirely. I am sorry.