I'm quite new to python and got the following problem.
I have two dataframes, where the first one looks like this:
df1
code product
10-00 apple
10-10 banana
10-20 grape
10-00 cucumber
20-00 tomato
20-10 onion
20-10 garlic
and the second one looks like:
df2
code colour
10-00 green
10-10 yellow
10-20 purple
20-00 red
20-10 white
I would like to have a loop that would give the following dataframe
df
10-00 apple green
10-10 banana yellow
10-20 grape purple
10-00 cucumber green
20-00 tomato red
20-10 onion white
20-10 garlic white
But I really can't figure it out where to start.. Anybody who has experience with such a problem?