I'm using a PostgreSQL database with Psycopg2 library.
I want to get the SQL table and convert it to a pd.DataFrame.
So I need to convert SQL table to a dict like {col1:[val1,val2], col2:[val1,val2]} but when I use SELECT * FROM tablename , it doesn't include column names.
I don't want to use pandas functions directly connectiong to SQL.
If you know how to get the SQL table as a dictionary like I mentioned above, I'm happy if you write.
Thanks for your help in advance.