我有一个用pd.DataFrame.from_dict创建的数据框,结果看起来像这样:
return admin.messaging().sendToTopic(topic, messagePayload, options)
.then(() => {
response.send("OK")
})
如何将列表中的值提取到新列? 甚至在从dict到数据帧的转换上做得更好?
所需的输出:
a b
0 [0.042167, 2.913] [0.042168, 0.245]
1 [0.042164, 1.739] [0.042179, 10.0]
2 [0.042161, 1.0] [0.042196, 2.199]
3 [0.042154, 0.351] [0.042202, 0.214]
4 [0.04215, 0.493] [0.042205, 36.28]
5 [0.042147, 1.0] [0.042207, 0.123]
6 [0.042146, 0.894] [0.042209, 0.47]