title: Pandas filter a column based on another column
body: <p>Given this dataframe</p>
  <pre><code>df = pd.DataFrame(\
  {'name': {0: 'Peter', 1: 'Anna', 2: 'Anna', 3: 'Peter', 4: 'Simon'},
   'Status': {0: 'Finished',
    1: 'Registered',
    2: 'Cancelled',
    3: 'Finished',
    4: 'Registered'},
   'Modified': {0: '2019-03-11',
    1: '2019-03-19',
    2: '2019-05-22',
    3: '2019-10-31',
    4: '2019-04-05'}})
  </code></pre>
  <p>How can I compare and filter based on the Status? I want the Modified column to keep the date where the Status is either &quot;Finished&quot; or &quot;Cancelled&quot;, and fill in blank where the condition is not met.</p>
  <pre><code>Wanted output:
  
  name      Status        Modified
  0  Peter  Finished      2019-03-11
  1   Anna  Registered  
  2   Anna  Cancelled     2019-05-22
  3  Peter  Finished      2019-10-31
  4  Simon  Registered  
  
  </code></pre>