Pandas dataframe fillna() only some columns in place
<p>I am trying to fill none values in a Pandas dataframe with 0's for only some subset of columns.</p>

<p>When I do:</p>

<pre><code>import pandas as pd
df = pd.DataFrame(data={'a':[1,2,3,None],'b':[4,5,None,6],'c':[None,None,7,8]})
print df
df.fillna(value=0, inplace=True)
print df
</code></pre>

<p>The output:</p>

<pre><code>     a    b    c
0  1.0  4.0  NaN
1  2.0  5.0  NaN
2  3.0  NaN  7.0
3  NaN  6.0  8.0
     a    b    c
0  1.0  4.0  0.0
1  2.0  5.0  0.0
2  3.0  0.0  7.0
3  0.0  6.0  8.0
</code></pre>

<p>It replaces every <code>None</code> with <code>0</code>'s. What I want to do is, only replace <code>None</code>s in columns <code>a</code> and <code>b</code>, but not <code>c</code>.</p>

<p>What is the best way of doing this?</p>