title: Checking for unique values in Pandas Data frame column and crossreferenceing with a second column
body: <p>I have a pandas dataframe that looks something like below.</p>
  <p>I want to check the values in User ID to see if it is unique. If so, then I then want to check the License Type column to see if it is a full trial then return a 1 in a new column 'Full_direct'. Else, i would return a 0 in the 'full_direct' column.</p>
  <pre><code>    Date         **User ID**          Product Name  License Type    Month   
  0   2017-01-01  10431046623214402832 90295d194237   trial       2017-01 
  1   2017-07-09  246853380240772174  29125b243095    trial       2017-07 
  2   2017-07-07  13685844038024265672    47423e1485  trial       2017-07 
  3   2017-02-12  2475366081966194134 202400c85587    full        2017-02 
  4   2017-04-08  761179767639020420  168300g168004   full        2017-04 
  </code></pre>
  <p>I made this attempt but wasnt able to iterate through the dataframe in this manner. I was hoping to see if someone could advise. Thanks!</p>
  <pre><code>for values in main_df['User ID']:
      if values.is_unique and main_df['License Type'] == 'full':
          main_df['Full_Direct'] = 1
      else:
          main_df['Full_direct'] = 0
  </code></pre>