the sample data i show below i try to select multiple column using df[["mentioneduser","place","hashtags"]]
{..."mentionedUsers": null,"place": {"_type": "snscrape.modules.twitter.Place", "fullName": "Berlin, Germany", "name": "Berlin", "type": "city", "country": "Germany", "countryCode": "DE"}, "hashtags": null, ...}
now i try to select df[["mentioneduser","country","hashtags"]]
inside the place column and it gave me this error
KeyError: "['country'] not in index"
do note that some place column only contain null{..."mentionedUsers": null,"place": null, "hashtags": null, ...}
, is that the reason causing this not to work? if so, is there a way to work around?
Edit: sample data
{"_type": "snscrape.modules.twitter.Tweet", "url": "https://twitter.com/QruxB/status/1344431618279284739", "date": "2020-12-30T23:54:10+00:00", "content": "a fucking gay furry", "renderedContent": "a fucking gay furry", "id": 1344431618279284739, "user": {"_type": "snscrape.modules.twitter.User", "username": "QruxB", "id": 1283418985522966532, "displayname": "Qrux_bot", "description": "Bot made by: @qrux5", "rawDescription": "Bot made by: @qrux5", "descriptionUrls": null, "verified": false, "created": "2020-07-15T15:11:51+00:00", "followersCount": 21, "friendsCount": 7, "statusesCount": 40918, "favouritesCount": 1, "listedCount": 2, "mediaCount": 1, "location": "", "protected": false, "linkUrl": "https://www.youtube.com/watch?v=j4Ph02gzqmY", "linkTcourl": null, "profileImageUrl": "https://pbs.twimg.com/profile_images/1329475104867295232/SSCHVJTw_normal.jpg", "profileBannerUrl": "https://pbs.twimg.com/profile_banners/1283418985522966532/1597230131", "url": "https://twitter.com/QruxB"}, "replyCount": 0, "retweetCount": 0, "likeCount": 0, "quoteCount": 0, "conversationId": 1344431618279284739, "lang": "en", "source": "<a href=\"https://cheapbotsdonequick.com\" rel=\"nofollow\">Cheap Bots, Done Quick!</a>", "sourceUrl": "https://cheapbotsdonequick.com", "sourceLabel": "Cheap Bots, Done Quick!", "outlinks": null, "tcooutlinks": null, "media": null, "retweetedTweet": null, "quotedTweet": null, "inReplyToTweetId": null, "inReplyToUser": null, "mentionedUsers": null, "coordinates": null, "place": {"_type": "snscrape.modules.twitter.Place", "fullName": "Berlin, Germany", "name": "Berlin", "type": "city", "country": "Germany", "countryCode": "DE"}, "hashtags": null, "cashtags": null}