I have three separate DataFrames:
import pandas as pd
df1 = pd.DataFrame({ "Log": ["1114","1115","1116","1117","1118","1119","120"], "Gender": ["2","2","2","1","1","1","2"] })
df2 = pd.DataFrame({"NAME": ["Gender"],"SOURCE": ["MALE_FEMALE_LIST"]})
df3 = pd.DataFrame({"ID":["0", "1", "2"], "MALE_FEMALE_LIST":["Select", "Male","Female"]})
df3.set_index("ID", inplace = True)
df1 is the location of the data I would like to recode based on information from df3. I would like to say if column header in df1 is the same as the NAME in df2, look in SOURCE in df2 and apply the df3 information to that column.