我有两个 Dataframe ,df1有编码数据,df2有代码及其标签,我想用df1中的标签替换代码。
df1 -
VBC VDV
1 5
1 7
2 9
2 10
df2 -
QCcode Response Label
VBC 1 Male
VBC 2 Female
VDV 5 Advertising
VDV 9 Marketing
我试图得到类似于下面的输出:
df_op -
VBC VDV
Male Advertising
Male Advertising
Female Marketing
1条答案
按热度按时间bgtovc5b1#
试试这些代码