Hi, I have two data frames, one containing:-
<p>Country Code | Population </p>
and another containing:-
<p>Country Code | Country Name. </p>
I want to do a replace in the first data frame so that CountryCode = CountryName where applicable. Important to note if the lookup failed, i.e. no CountryCode matched in second data frame I would like to keep as is. Any ideas how this can be done?
Sample:-
<p>Country Code | Population </p>
<p>RSA | 100</p>
<p>POL | 50</p>
<p> Country Code | Country Name </p>
<p> RSA | South Africa </p>
Expected Output for DF1
<p> Country Code | Population </p>
<p> South Africa | 100 </p>
<p> POL | 50 </p>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…