title: How to normalize pandas datetime index
body: <p>I am having pandas dataframe with datetime index.
  I am trying to normalize it to midnight.
  <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.dt.normalize.html" rel="nofollow noreferrer">https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.dt.normalize.html</a>
  What I get is the following</p>
  
  <pre><code>print('before')
  print(df.head())
  df.index=df.index.normalize()
  print('after')
  print(df.head())
  
  before
                       cabin    hx
  2000-01-01 00:20:51   21.1  19.1
  2000-01-01 00:21:01   21.1  19.1
  2000-01-01 00:21:11   21.1  19.2
  2000-01-01 00:21:21   21.1  19.1
  2000-01-01 00:21:31   21.1  17.9
  after
              cabin    hx
  2000-01-01   21.1  19.1
  2000-01-01   21.1  19.1
  2000-01-01   21.1  19.2
  2000-01-01   21.1  19.1
  2000-01-01   21.1  17.9
  </code></pre>
  
  <p>So hour, min and sec are dropped away.
  Help appreciated.</p>