擅长:python、mysql、java
<h3><code>DataFrame.replace</code></h3>
<pre><code>df1.replace(df2.melt('rating').pivot('value', 'variable', 'rating'))
</code></pre>
<hr/>
<pre><code> section name overall admission room
0 0 Supriya Bachal 5.0 4.0 2.0
1 1 Meena Kumari 4.0 4.0 2.0
2 2 Sunita Banik 4.0 5.0 4.0
3 3 Madhuri Bhat 5.0 5.0 5.0
4 4 Arushi Sharda 5.0 5.0 5.0
5 5 Vishwas Kini 5.0 5.0 5.0
6 6 Nishit goyal 4.0 4.0 4.0
7 7 Shibiraj Soni 5.0 NaN 5.0
</code></pre>