title: Python - Get most recent date in a pandas dataframe
body: <p>I have to get the most recent date in a dataframe pandas. 
  I wrote this code:</p>
  
  <pre><code>  df=pd.read_csv('waterquality.csv')
    # Convert date to datetime type
    df['SampleDate'] = df['SampleDate'].astype('datetime64[ns]')
    #print(df.SampleDate.max())
  
    g=df.groupby(['name','beach','ParameterCode']).SampleDate.max()
    print(g)
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>  [...]
    Seal Beach        Seal Beach Pier     Enterococcus      2018-12-09
                                          Total Coliforms   2018-12-09
  </code></pre>
  
  <p>But the date is not the most recent. Can anyone help me? Thanks</p>