我有一个.csv文件,里面有所有的机场和其他信息
import csv
from collections import defaultdict
columns = defaultdict(list)
with open('airports.csv', newline='', encoding='utf-8') as f:
reader = csv.DictReader(f)
for row in reader:
for (k,v) in row.items():
columns[k].append(v)
print(columns['longitude_deg'])
print(columns['latitude_deg'])
这会输出类似
^{pr2}$无论是经度还是纬度。在
我如何使用这些来精确定位地图上的位置?(使用python)
如果您想在googlemaps上实现这一点(正如您的标记所示),您将需要为googlemapsjavascriptapi使用Python包装器。您将需要使用类似http://code.google.com/p/pygmaps/的内容。在
安装时:
然后举例来说:
^{pr2}$将产生:
相关问题 更多 >
编程相关推荐