def write_dict_to_csv(list_of_dictionaries, output_file):
"""write a list of dictionaries to a csv file."""
fieldnames = ['centroid_lon', 'centroid_lat', 'feature_type', 'name', 'source']
with open(output_file, 'w', newline = '') as f:
w = csv.DictWriter(f, fieldnames, quoting = csv.QUOTE_ALL)
w.writeheader()
w.writerows(list_of_dictionaries)
get_london_location_data.py 文件源码
python
阅读 41
收藏 0
点赞 0
评论 0
评论列表
文章目录