title: Syntax to use df.apply() with datetime.strptime
body: <p>Consider the following table 'df':</p>
  
  <pre><code>    date        sales  
  0   2021-04-10  483  
  1   2022-02-03  226  
  2   2021-09-23  374  
  3   2021-10-17  186  
  4   2021-07-17   35
  </code></pre>
  
  <p>I would like to convert the column date that is currently a string to a date by using <code>apply()</code> and <code>datetime.strptime()</code>.  </p>
  
  <p>I tried the following:  </p>
  
  <pre><code>format_date = "%Y-%m-%d"
  df["date_new"] = df.loc[:,"date"].apply(datetime.strptime,df.loc[:,"date"],format_date)
  </code></pre>
  
  <p>I have the following error.</p>
  
  <blockquote>
    <p>The truth value of a Series is ambiguous. Use a.empty, a.bool(),
    a.item(), a.any() or a.all().</p>
  </blockquote>
  
  <p>I tried with different syntaxes (with <code>args</code> and <code>**kwds</code> arguments of <code>apply()</code> but I am always getting an error)
  such as:</p>
  
  <blockquote>
    <p>apply() takes exactly 2 arguments (3 given)  </p>
  </blockquote>
  
  <p>Can someone help me with the syntax ? Thank you.</p>