Pandas: replace column based on index
<p>I have the following problem: I have a pandas dataframe with multiple columns with the same name.
I want to replace one of these particular column with new data (from another dataframe).
Note that I cannot use the syntax:</p>

<pre><code>df['var_name'] = replacing_var_vals
</code></pre>

<p>Equivalent solution to my problem would be renaming a column based on index.</p>

<p>I've searched for hours but didn't find a solution to this easy task. 
Could you help?</p>