Pandas dataframe to PostgreSQL table using psycopg2 without SQLAlchemy?
you can try but this code in your:
cursor = conn.cursor() cur.copy_from(df, schema , null='', sep=',', columns=(my_data))
reference code:copy dataframe to postgres table with column that has defalut value