title: Is there a way to overwrite data using pandas.to_sql or another function?
body: <p>I have a dataframe that I am writing to a table. I don't necessarily need to retain the data day to day, so I would prefer to just overwrite it. I tried using the following function assuming that it would replace the data rather than the table:</p>
  
  <pre><code>df.to_sql('new_test', con=connStr, if_exists='replace', index=False, schema='master')
  </code></pre>
  
  <p>The issue with this is I assume the SQL language on the backend dropped the table rather than truncated the data within. I suspect this because it completely scrubbed by table of all constraints and changed a datetime column to a timestamp column. Is there a way around this? Thanks in advance.</p>