title: Compare data frame column values in datetime with integer?
body: <p>I have a dataframe column with dates (already converted into datetime format). Now I need to compare the years in the column with a number, for example:</p>
  
  <pre><code>Date 
  01-02-2018
  04-07-2016
  09-09-2019
  </code></pre>
  
  <p>and I want to make this comparison:</p>
  
  <pre><code>if dfA['Date'].dt.year == current:
     ## do something
  </code></pre>
  
  <p>There are two problems: </p>
  
  <p>The code gives me this error</p>
  
  <pre><code>ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
  
  </code></pre>
  
  <p>and the number is from a user input assigned to the name current (I convert current to int using the following code):</p>
  
  <pre><code>current = int(args.User_Input)
  </code></pre>
  
  <p>Not sure why it is giving me an error</p>