2 回答
TA贡献1811条经验 获得超6个赞
你的意思是这样?
>>> data = [
{
"email": "a4@yahoo.com ",
"agreed_to_terms": True,
"toy_duration": 2,
"dog_name": "Oakley",
"dog_breeds": ["Mixed Breed / Mutt"],
"zip": "95355",
"human_name": "Alina",
},
{
"zip": "45014",
"human_name": "Neil",
"agreed_to_terms": True,
"email": "Nek@gmail.com ",
"toy_duration": 0,
"dog_name": "Maize, Georgie",
"dog_breeds": ["German Shorthaired Lab", "Shih Tzu"],
},
{
"agreed_to_terms": True,
"email": "2@aol.com",
"toy_duration": 2,
"dog_name": "Chewie",
"dog_breeds": ["Shih Tzu"],
"zip": "32068",
"human_name": "Amber",
},
]
>>> pd.DataFrame(data)
agreed_to_terms dog_breeds dog_name email human_name toy_duration zip
0 True [Mixed Breed / Mutt] Oakley a4@yahoo.com Alina 2 95355
1 True [German Shorthaired Lab, Shih Tzu] Maize, Georgie Nek@gmail.com Neil 0 45014
2 True [Shih Tzu] Chewie 2@aol.com Amber 2 32068
积累一个狗的列表,它很容易变成一个 Pandas 数据框。
添加回答
举报