Мне нужно выровнять эту структуру папок json в табличный формат, используя pandas. Я пытался некоторое время сейчас, но не смог получить это. Я не могу заставить json_normalize работать.
[
{
"folderId": 0,
"pid": 0,
"path": "/All Traits",
"parentFolderId": 0,
"folderCount": 12,
"subFolders": [
{
"folderId": 5098,
"pid": 0,
"path": "/All Traits/3rd-Party Data",
"parentFolderId": 0,
"folderCount": 0,
"subFolders": [],
"dataSourceId": 0,
"name": "3rd-Party Data"
},
{
"folderId": 671518,
"pid": 2343,
"path": "/All Traits/Analytics Traits",
"parentFolderId": 0,
"folderCount": 62,
"subFolders": [
{
"folderId": 766737,
"pid": 2343,
"path": "/All Traits/Analytics Traits/300000767",
"parentFolderId": 671518,
"folderCount": 6,
"subFolders": [
{
"folderId": 872557,
"pid": 2343,
"path": "/All Traits/Analytics Traits/300000767/deltadeltamicrositedev",
"parentFolderId": 766737,
"folderCount": 0,
"subFolders": [],
"name": "deltadeltamicrositedev"
}],
"name": "300000767"
},
{
"folderId": 766740,
"pid": 2343,
"path": "/All Traits/Analytics Traits/dalbadprod",
"parentFolderId": 671518,
"folderCount": 0,
"subFolders": [],
"name": "dalbadprod"
},
{
"folderId": 766743,
"pid": 2343,
"path": "/All Traits/Analytics Traits/dalchrome",
"parentFolderId": 671518,
"folderCount": 0,
"subFolders": [],
"name": "dalchrome"
}
],
"name": "Analytics Traits"
}],
"name": "All Traits"
}
]
Выходной путь, dataSourceId, subFolders, parentFolderId, имя, pid, folderCount, folderId