title: Check for duplicate values in Pandas dataframe column
body: <p><strong>Is there a way in pandas to check if a dataframe column has duplicate values, without actually dropping rows?</strong> I have a function that will remove duplicate rows, however, I only want it to run if there are actually duplicates in a specific column.</p>
  
  <p>Currently I compare the number of unique values in the column to the number of rows: if there are less unique values than rows then there are duplicates and the code runs.</p>
  
  <pre><code> if len(df['Student'].unique()) &lt; len(df.index):
      # Code to remove duplicates based on Date column runs
  </code></pre>
  
  <p>Is there an easier or more efficient way to check if duplicate values exist in a specific column, using pandas?</p>
  
  <p>Some of the sample data I am working with (only two columns shown). If duplicates are found then another function identifies which row to keep (row with oldest date):</p>
  
  <pre><code>    Student Date
  0   Joe     December 2017
  1   James   January 2018
  2   Bob     April 2018
  3   Joe     December 2017
  4   Jack    February 2018
  5   Jack    March 2018
  </code></pre>