index str_json
0 {"KEY1":1,"ai_count":0,"KEY2":0,"KEY3...
1 {"KEY1":1,"ai_count":0,"KEY2":0,"KEY3...
2 {"KEY1":1,"ai_count":0,"KEY2":0,"KEY3...
3 {"KEY1":1,"ai_count":0,"KEY2":0,"KEY3...
...
Data frame as above, str_json is a string of json structure. If it's just a json value, the json_nnormalize function allows you to make a data frame flat as the key value becomes a column, but how do you handle the string structure?
python python3.6 pandas
If you write json.loads, replace the json string of the string type with dict.
© 2024 OneMinuteCode. All rights reserved.