我在下面給出的結(jié)構(gòu)中有一個(gè)字典,我需要將它轉(zhuǎn)換成一個(gè) Pandas Dataframe 來(lái)做一些聚合操作。但我無(wú)法將其轉(zhuǎn)換為給定的輸出格式{ "raj": [ { "subject": "science", "score": "35", "create_time": "1595990288421" }, { "subject": "maths", "score": "40", "create_time": "1595980800000" } ], "dev": [ { "subject": "science", "score": "23", "create_time": "1595990288421" } ], "mag":[ { "subject": "science", "score": "41", "create_time": "1595990288421" }, { "subject": "maths", "score": "25", "create_time": "1595980800000" } ]}我需要輸出數(shù)據(jù)幀為給定格式name subject score create_time------------------------------------------raj science 35 1595990288421raj maths 40 1595980800000dev science 23 1595990288421mag science 35 1595990288421mag maths 25 1595980800000誰(shuí)能幫我把字典轉(zhuǎn)換成所需的數(shù)據(jù)幀輸出?
將字典列表的字典轉(zhuǎn)換為 Pandas 數(shù)據(jù)框
蠱毒傳說(shuō)
2023-04-18 10:59:32