別把鳥丟了
你想把 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)