title: pandas.to_datetime inconsistent time string format
body: <p>I am attempting to convert the index of a <code>pandas.DataFrame</code> from string format to a datetime index, using <code>pandas.to_datetime()</code>.</p>
  
  <p>Import pandas:</p>
  
  <pre><code>In [1]: import pandas as pd
  
  In [2]: pd.__version__
  Out[2]: '0.10.1'
  </code></pre>
  
  <p>Create an example DataFrame:</p>
  
  <pre><code>In [3]: d = {'data' : pd.Series([1.,2.], index=['26/12/2012', '10/01/2013'])}
  
  In [4]: df=pd.DataFrame(d)
  </code></pre>
  
  <p>Look at indices. Note that the date format is day/month/year:</p>
  
  <pre><code>In [5]: df.index
  Out[5]: Index([26/12/2012, 10/01/2013], dtype=object)
  </code></pre>
  
  <p>Convert index to datetime:</p>
  
  <pre><code>In [6]: pd.to_datetime(df.index)
  Out[6]: 
  &lt;class 'pandas.tseries.index.DatetimeIndex'&gt;
  [2012-12-26 00:00:00, 2013-10-01 00:00:00]
  Length: 2, Freq: None, Timezone: None
  </code></pre>
  
  <p>Already at this stage, you can see that the date format for each entry has been formatted differently. The first is fine, the second has swapped month and day.</p>
  
  <p>This is what I want to write, but avoiding the inconsistent formatting of date strings:</p>
  
  <pre><code>In [7]: df.set_index(pd.to_datetime(df.index))
  Out[7]: 
  data
  2012-12-26   1
  2013-10-01   2
  </code></pre>
  
  <p>I guess the first entry is correct because the function 'knows' there aren't 26 months, and so does not choose the default month/day/year format.</p>
  
  <p>Is there another/better way to do this? Can I pass the format into the <code>to_datetime()</code> function?</p>
  
  <p>Thank you.</p>
  
  <p>EDIT:</p>
  
  <p>I have found a way to do this, without pandas.to_datetime:</p>
  
  <pre><code>import datetime.datetime as dt
  date_string_list = df.index.tolist()
  datetime_list = [ dt.strptime(date_string_list[x], '%d/%m/%Y') for x in range(len(date_string_list)) ]
  df.index=datetime_list
  </code></pre>
  
  <p>but it's a bit messy. Any improvements welcome.</p>