Postgresql – Create list of dictionaries from Postgres table
I want to create a list of dictionaries from a postgres table. I use this code: rows_dict = cur.fetchall() # fetch all rows from the Postgres Database columns = [] entities_list = [] for column in cur.description: columns.append(column[0].lower()) entities =…