熊猫系列to_record

时间:2017-05-16 01:42:28

标签: pandas

想知道如何输出pandas Series to_record或to_dict(orient =" record"), 因为这仅适用于数据帧。 显而易见的解决方案是for循环,但是有一种方法可以做到吗?

1 个答案:

答案 0 :(得分:2)

Is this what you are after?

s.to_frame().to_records()