title: Pandas - Determining max date for each account in a dataframe
body: <p>I have a sample dataframe:</p>
  
  <pre><code>df = pd.DataFrame({'Account':['1234', '1234', '4567', '4567'],
                     'Date':['12/5/2017', '12/5/2017', '12/10/2017', '12/11/2017']})
  
  df.Date = pd.to_datetime(df.Date)
  
  df.head()
  
       Account   Date
  0    1234     2017-12-05
  1    1234     2017-12-05
  2    4567     2017-12-10
  3    4567     2017-12-11
  </code></pre>
  
  <p>I would like to add a column called MaxDate which would contain the last date for each account. End result like this:</p>
  
  <pre><code>df = pd.DataFrame({'Account':['1234', '1234', '4567', '4567'],
                     'Date':['12/5/2017', '12/5/2017', '12/10/2017', '12/11/2017'],
                     'MaxDate':['12/5/2017', '12/5/2017', '12/11/2017', '12/11/2017']})
  
  df.Date = pd.to_datetime(df.Date)
  df.MaxDate = pd.to_datetime(df.MaxDate)
  
  df.head()
  
       Account  Date         MaxDate
  0    1234     2017-12-05   2017-12-05
  1    1234     2017-12-05   2017-12-05
  2    4567     2017-12-10   2017-12-11
  3    4567     2017-12-11   2017-12-11
  </code></pre>
  
  <p>I'm not sure if I should be iterating over the dataframe or? Note that the data set can be a million rows so performance is a consideration. Any guidance appreciated.</p>