开始使用免费开始使用

别把小鸟"扔"了

您想像上个练习那样把 birds 数据读入一个 DataFrame,不过这次希望尝试一种不同的方法。

您希望写出一段可复用的代码,因此想找出把数据转换为可用 DataFrame 的最快策略。您认为使用 json 格式可能会加快处理。

birds DataFrame 已为您提供。

本练习是课程的一部分

使用 pandas 重塑数据

查看课程

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Apply json.loads to the bird_facts column and transform it to a list
birds_facts = ____[____].____(____).____

# Print birds_facts
print(birds_facts)
编辑并运行代码