Get decimal data from Postgrades database using Django

I use Python and the Django framework to get some decimal data from the PostGress database. My question is that the variable "new_poi_lat" is displayed correctly, but why is the variable "poi_lat" displayed as shown below ?! I want the "poi_lat" variable to be displayed normally. And then I want to use "zip (poi_lat, poi_log)" but it gives an error!

My code:

poi_lat = []
poi_log = []
for id in IDs:
    poi_name =  end_poi.values_list('lat','log').filter(id=id)
    new_poi_lat = poi_name[0][0]
    new_poi_log = poi_name[0][1]
    print("new_poi_lat:" , new_poi_lat)

    poi_lat.append(new_poi_lat)
    poi_log.append(new_poi_log)

   print("poi_lat:" , poi_lat)
coordinates = (zip(poi_lat, poi_log))

output:
new_poi_lat: 34.791553
new_poi_lat: 34.804567

poi_lat: [Decimal('34.791553'), Decimal('34.804567')]



from Recent Questions - Stack Overflow https://ift.tt/3l55ppQ
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)