title: TypeError: Cannot cast DatetimeIndex to dtype datetime64[us]
body: <p>TypeError: Cannot cast DatetimeIndex to dtype datetime64[us]</p>
  
  <pre><code>import time
  import pandas as pd
  import sqlalchemy
  from sqlalchemy import create_engine
  import psycopg2
  engine1 = create_engine('postgresql://postgres:postgres@localhost:5432/db1')
  engine2 = create_engine('postgresql://postgres:postgres@localhost:5432/db2')
  df = pd.read_sql_query("""
  select id,text,created_date,is_read,to_user_id,is_new,url,text_ar,text_en from notifications_notification where created_date &lt;= NOW() - interval '1 month'""",engine1)
  
   df= df.rename(columns={  'id':'original_id','text':'text','created_date':'created_date','is_read':'is_read','to_user_id':'to_user_id','is_new':'is_new','url':'url','text_ar':'text_ar','text_en':'text_en'})
  
  df.index = df.index.values.astype('datetime64[us]')                                          
  
  df.to_sql(name='notifications_notification_archive',con=engine2,if_exists='append')
  </code></pre>