Multiplying specific columns of dataframe by constant scalar value
<p>How do I multiply only specific columns of a dataframe by a constant value?</p>

<pre><code>df0 = pd.DataFrame({'A' : 1.,
                    'B' : 1,
                    'C' : 1,
                    'D' : np.array([1] * 4,dtype='int32')})

mult_by_two = df0.iloc[:,2:].mul(2)
print mult_by_two
</code></pre>

<p>I get this:</p>

<pre><code>   C  D
0  2  2
1  2  2
2  2  2
3  2  2
</code></pre>

<p>but what I want is this:</p>

<pre><code>   A  B  C  D
0  1  1  2  2
1  1  1  2  2
2  1  1  2  2
3  1  1  2  2
</code></pre>