Hi All,I have a postgres database with 'myTable' having three columns as followed.idSubContinent Country1South-East Asia Indonesia2South-East Asia Thailand3South-East Asia Malaysia4South-East Asia Singapore5South-East Asia Philippines6South-East Asia Vietnam7South-East Asia Myanmar8South-East Asia Brunei9South-East Asia Cambodia10South-East Asia Laos11South-East Asia Timor Leste I want to filter & select the table with some condition.SELECT SubContinent, Country from myTable WHERE Country='Thailand' ;Accessing to pgdatabase via Python is okay for me.Using the PSQL command via Python, I would like to select the columns and store the values in an array of dictionary like below.dict= {'SubContinent': 'South-East Asia', 'Country': 'Thailand'}; How can I put the selection result into a Python dictionary?Any help is highly appreciate.Many thanks in advanced.Best regards-- Have a nice day!--Mr. Khun San Aung
id
SubContinent
Country
1
South-East Asia
Indonesia
2
Thailand
3
Malaysia
4
Singapore
5
Philippines
6
Vietnam
7
Myanmar
8
Brunei
9
Cambodia
10
Laos
11
Timor Leste
I want to filter & select the table with some condition.
SELECT SubContinent, Country from myTable WHERE Country='Thailand' ;
Accessing to pgdatabase via Python is okay for me.
Using the PSQL command via Python, I would like to select the columns and store the values in an array of dictionary like below.
dict= {'SubContinent': 'South-East Asia', 'Country': 'Thailand'};
How can I put the selection result into a Python dictionary?
Any help is highly appreciate.
Many thanks in advanced.
Best regards
Mr. Khun San Aung
pgsql-admin by date:
Соглашаюсь с условиями обработки персональных данных