engine = create_engine('postgresql://user:password@server/db')
df.to_sql('new_table', con=engine, if_exists='append', index=False, chunksize=20000)
I want to print a message every time a chunksize has to been written to the DB, so that I know the script is successfully running. How can I achieve this?