能帮我吗,我正在尝试将返回google API的JSON转换为表格格式(数据框),以导出为CSV或其他表格类型。
我已经附上了预期结果的屏幕截图
我已经在互联网上看到了几个示例,但是由于Google api的使用,所以不使用嵌套的JSON。 非常感谢您的帮助和时间。
{
"html_attributions": [],
"results": [
{
"geometry": {
"location": {
"lat": 13.6945775,
"lng": -89.2110781
},
"viewport": {
"northeast": {
"lat": 13.6959703302915,
"lng": -89.2097351697085
},
"southwest": {
"lat": 13.6932723697085,
"lng": -89.2124331302915
}
}
},
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/shopping-71.png",
"id": "373c45e64407f28195415a8911015cc8020cea46",
"name": "Tienda Los Angeles",
"opening_hours": {
"open_now": true
},
"place_id": "ChIJVznGtFkwY48RSFWKZ3a5eBs",
"plus_code": {
"compound_code": "MQVQ+RH San Salvador, El Salvador",
"global_code": "765GMQVQ+RH"
},
"rating": 4,
"reference": "ChIJVznGtFkwY48RSFWKZ3a5eBs",
"scope": "GOOGLE",
"types": [
"convenience_store",
"food",
"store",
"point_of_interest",
"establishment"
],
"user_ratings_total": 3,
"vicinity": "Antigua Calle Ferrocarril 16, San Salvador"
},
{
"geometry": {
"location": {
"lat": 13.7007156,
"lng": -89.224008
},
"viewport": {
"northeast": {
"lat": 13.7021389802915,
"lng": -89.2226825697085
},
"southwest": {
"lat": 13.6994410197085,
"lng": -89.2253805302915
}
}
},
"icon": "https://maps.gstatic.com/mapfiles/place_api/icons/shopping-71.png",
"id": "e4ffa86f54d8f8c24b661cbe509bf625ac8a86be",
"name": "Ilusión de San Salvador",
"opening_hours": {
"open_now": true
},
"photos": [
{
"height": 250,
"html_attributions": [
"<a href=\"https://maps.google.com/maps/contrib/117368568685068785749/photos\">Ilusión de San Salvador</a>"
],
"photo_reference": "CmRaAAAAXTRH8t7LE1rAUD7SOmPZ7Em-pCTUhID6hLUjlm4p6AE8FMdxUsrl8d8V3rtrrnmuAdBPs-Bvo4YAG3W5TMDmo5OjCzYKDIsO-3d0tkNKegT0VXjnwcjEUbHSAH7nA6k5EhDglO5d6tn1k4L0XP_xIDPkGhRhGdyA98DLRTpTj4x2B46V-5bsCw",
"width": 250
}
],
"place_id": "ChIJ5zsWbUEwY48Re_44N6JVEX0",
"plus_code": {
"compound_code": "PQ2G+79 San Salvador, El Salvador",
"global_code": "765GPQ2G+79"
},
"rating": 4.5,
"reference": "ChIJ5zsWbUEwY48Re_44N6JVEX0",
"scope": "GOOGLE",
"types": [
"convenience_store",
"clothing_store",
"food",
"store",
"point_of_interest",
"establishment"
],
"user_ratings_total": 13,
"vicinity": "Col Escalón, Alameda Franklin Delano Roosevelt No 3425"
}
],
"status": "OK"
}