title: How to solve the error 'Cannot do inplace boolean setting on mixed-types with a non np.nan value'
body: <p>I want to fill <code>np.nan</code> with <code>0</code> in <code>pd.DataFrame</code> when columns satisfied specific conditions.
  </p>
  
  <pre><code>import pandas as pd
  import numpy as np
  from datetime import datetime as dt
  
  df = pd.DataFrame({'A': [np.datetime64('NaT'), dt.strptime('201803', '%Y%m'), dt.strptime('201804', '%Y%m'), np.datetime64('NaT'), dt.strptime('201806', '%Y%m')],
                     'B': [1, np.nan, 3, 4, np.nan],
                     'C': [8, 9, np.nan, 4, 1]})
  
             A   B   C
  0        NaT 1.0 8.0
  1 2018-03-01 NaN 9.0
  2 2018-04-01 3.0 NaN
  3        NaT 4.0 4.0
  4 2018-06-01 NaN 1.0
  </code></pre>
  
  <p>When <code>df['A'] &gt;= dt.strptime('201804', '%Y%m')</code>, I want to fill <code>np.nan</code> with <code>0</code> in columns B and C. I want to get dataframe as below.</p>
  
  <pre><code>           A   B   C
  0        NaT 1.0 8.0
  1 2018-03-01 NaN 9.0
  2 2018-04-01 3.0 0.0
  3        NaT 4.0 4.0
  4 2018-06-01 0.0 1.0 
  </code></pre>
  
  <p>I tried </p>
  
  <pre><code>m = df[df['A'] &gt;= dt.strptime('201804', '%Y%m')][['B', 'C']].isnull()
  df.mask(m, 0, inplace=True)
  </code></pre>
  
  <p>and got error <code>Cannot do inplace boolean setting on mixed-types with a non np.nan value</code>. I think this error caused by existence of <code>NaT</code> in column A...</p>
  
  <p>Is there another way to get desired dataframe by using <code>mask</code> method?</p>