My question is on how to create a list of dictionaries from a list of lists, and is a deviation from this question Dict Comprehension python from list of lists and this question List of Lists to List of Dictionaries
I have a very long pandas data frame with latitudes and longitudes as such
LAT LON
40 5
40 6
41 5
42 8
42 9
I managed to transform it into a list of lists with towers.values(towers is the name of the dataframe) in which each list is of the format [lat,lon]
My goal is to have
list_dict = [{'lat': 40, 'lon': 5},
{'lat': 40, 'lon': 6},
{'lat': 41, 'lon': 5},
{'lat': 41, 'lon': 5},
{'lat': 42, 'lon': 8},
{'lat': 42, 'lon': 9}]
How can I do this?