我是python新手。我正在Azure数据块上运行python。我有一个.json文件。我把json文件的重要字段放在这里
{
"school": [
{
"schoolid": "mr1",
"board": "cbse",
"principal": "akseal",
"schoolName": "dps",
"schoolCategory": "UNKNOWN",
"schoolType": "UNKNOWN",
"city": "mumbai",
"sixhour": true,
"weighting": 3,
"paymentMethods": [
"cash",
"cheque"
],
"contactDetails": [
{
"name": "picsa",
"type": "studentactivities",
"information": [
{
"type": "PHONE",
"detail": "+917597980"
}
]
}
],
"addressLocations": [
{
"locationType": "School",
"address": {
"countryCode": "IN",
"city": "Mumbai",
"zipCode": "400061",
"street": "Madh",
"buildingNumber": "80"
},
"Location": {
"latitude": 49.313885,
"longitude": 72.877426
},
我需要创建一个数据框,其中schoolName作为一列&;纬度及;经度是另外两列。你能告诉我怎么做吗
用这个
数据现在是exp目录的字典
有关JSON的更多信息:
https://docs.python.org/3/library/json.html
和python字典:
https://www.programiz.com/python-programming/dictionary#:~:text=Python%20dictionary%20is%20an%20unordered,when%20the%20key%20is%20known
您可以使用方法json.load(),下面是一个示例:
相关问题 更多 >
编程相关推荐