I'm new to python. I have two pandas dataframes that are indexed differently. I want to copy a column from one to another. Dataframe 1: Holds the id and class that each image belongs to
ID index class 0 10472 10472 0 1 7655 7655 0 2 6197 6197 0 3 9741 9741 0 4 9169 9169 0 Dataframe 2: Holds the id of the image in index and the image data in data columns
data index 5882 [[[255, 255, 255, 0], [255, 255, 255, 0], [255... 360 [[[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0... 1906 [[[255, 255, 255, 0], [255, 255, 255, 0], [255... 3598 [[[255, 255, 255, 0], [232, 232, 247, 25], [34... 231 [[[255, 255, 255, 0], [234, 234, 234, 0], [57,... I want to iterate through the dataframe1 and pick up the image id and look up the dataframe 2 for the matching id in the index and copy the 'data' column over to dataframe1. How could i do this (in a performance optimal way)?