✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
📊 Dash 2.0 is Arriving. Register here.

Exporting data from Dash to PostgreSQL

I have a dashboard where the user inputs data. This gets stored in a df and I generate a csv link. I want to know how I can upload the df to csv to postreSQL? I’ve been trying to use psycopg2 but haven’t had any luck.

Hi! If csv is not important you can write data with pandas.DataFrame.to_sql https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.to_sql.html

Appreciate it, thanks!