title: Remove time portion of DateTime index in pandas
body: <p>When I query a service through their API for daily data, they throw in a time portion which is equal to whatever time the query was made. So my pandas dataframe looks like this when I called the function at 14:54:36 -</p>
  
  <pre><code>2018-05-16 14:54:36  1024.75  1008.25      ...        39221        242897
  2018-05-17 14:54:36  1017.00  1002.00      ...        35361        241132
  2018-05-18 14:54:36  1015.75  1002.75      ...        49090        242938
  2018-05-21 14:54:36  1034.50  1020.75      ...        56950        243316
  2018-05-22 14:54:36  1043.75  1028.50      ...        49724        247874
  2018-05-23 14:54:36  1049.00  1036.25      ...        46256        253609
  2018-05-24 14:54:36  1059.75  1047.00      ...        65352        259617
  </code></pre>
  
  <p>As this is daily data, the time portion is useless. When I do:</p>
  
  <pre><code>data = pd.read_csv(StringIO(data), index_col=0, header=None,names=['High','Low','Open','Close','Volume','OpenInterest'])
  data.index = pd.to_datetime(data.index,format="%Y-%m-%d")
  </code></pre>
  
  <p>The format doesn't seem to work. The DateTime index still contains time. Any idea how I can remove the time portion?</p>