title: Replace one column's values with NaN based on date conditions in Pandas
body: <p>I try to replace/update <code>price</code> column's values based on condition of: if <code>date</code> is equal to <code>2019-09-01</code>, then replace or update them with with <code>np.nan</code>, I use two methods but not worked out so far:</p>
  
  <pre><code>         price     pct      date
  0  10379.00000  0.0242  2019/6/1
  1  10608.25214     NaN  2019/9/1
  2  10400.00000  0.0658  2019/6/1
  3  10258.48471     NaN  2019/9/1
  4  12294.00000  0.1633  2019/6/1
  5  11635.07402     NaN  2019/9/1
  6  12564.00000 -0.0066  2019/6/1
  7  13615.10992     NaN  2019/9/1
  </code></pre>
  
  <p>Solution 1: <code>df.price.where(df.date == '2019-09-01', np.nan, inplace=True)</code>, but it replaced all <code>price</code> values with <code>NaN</code></p>
  
  <pre><code>   price     pct        date
  0    NaN  0.0242  2019-06-01
  1    NaN     NaN  2019-09-01
  2    NaN  0.0658  2019-06-01
  3    NaN     NaN  2019-09-01
  4    NaN  0.1633  2019-06-01
  5    NaN     NaN  2019-09-01
  6    NaN -0.0066  2019-06-01
  7    NaN     NaN  2019-09-01
  </code></pre>
  
  <p>Solution 2: <code>df.loc[df.date == '2019-09-01', 'price'] = np.nan</code>, this didn't replace values.</p>
  
  <pre><code>         price     pct        date
  0  10379.00000  0.0242  2019-06-01
  1  10608.25214     NaN  2019-09-01
  2  10400.00000  0.0658  2019-06-01
  3  10258.48471     NaN  2019-09-01
  4  12294.00000  0.1633  2019-06-01
  5  11635.07402     NaN  2019-09-01
  6  12564.00000 -0.0066  2019-06-01
  7  13615.10992     NaN  2019-09-01
  </code></pre>
  
  <p>Please note <code>date</code> in excel file before <code>read_excel</code> is <code>2019/9/1</code> format, I have converted it with <code>df['date'] = pd.to_datetime(df['date']).dt.date</code>.</p>
  
  <p>Someone why this doesn't work? Thanks.</p>