title: Convert string to datetime - python dataframe
body: <p>Hi I want to convert a dataframe column (string) into date.I found it converted some of the dates correctly and some of them are wrong.</p>
  
  <pre><code>df
    Id       Date     Rev
  1605380 1/12/2018   3000.0
  2237851 27/11/2018  3000.0
  1797180 11/2/2018   2000.0
  1156126 9/1/2018    2000.0
  1205792 8/4/2017    2000.0
  </code></pre>
  
  <p><code>df['Date'] = pd.to_datetime(df['Date'])</code></p>
  
  <p>The output I got</p>
  
  <pre><code> Id       Date      Rev
  1605380 2018-01-12  3000.0
  2237851 2018-11-27  3000.0
  1797180 2018-11-02  2000.0
  1156126 2018-09-01  2000.0
  1205792 2017-08-04  2000.0
  </code></pre>
  
  <p>It seems that if the "day" is not two digit, datetime converted it into "month" instead of "day". Therefore, 1/12/2018 should be 2018-12-01, not 2018-01-12. 
  How can I fix this issue ? </p>
  
  <p>I actually only need year and month for the output.  </p>
  
  <p>Ideal output</p>
  
  <pre><code>  Id       Date     Rev
  1605380 2018-12    3000.0
  2237851 2018-11    3000.0
  1797180 2018-02    2000.0
  1156126 2018-01    2000.0
  1205792 2017-04    2000.0
  </code></pre>