これはjsonlの私のデータ構造です
"content": "Not yall gassing up a gay boy with no rhythm", "place": {"_type": "snscrape.modules.twitter.Place", "fullName": "Manhattan, NY", "name": "Manhattan", "type": "city", "country": "United States", "countryCode": "US"}
このコードで場所の列からcountryCodeを選択しようとしています
country_df = test_df.loc[test_df['place'].notnull(), ['content', 'place']]
countrycode_df = country_df["place"].loc["countryCode"]
しかし、それは私にこのエラーを与えました
KeyError: 'countryCode'
どうすればこれを修正できますか?
この方法を試してみましたが、私の状況には合いませんでした