Reshape of pandas series?

前端 未结 5 1205
轮回少年
轮回少年 2020-12-17 10:32

It looks to me like a bug in pandas.Series.

a = pd.Series([1,2,3,4])
b = a.reshape(2,2)
b

b has type Series but can not be displayed, the l

5条回答
  •  天命终不由人
    2020-12-17 10:45

    Just use this below code:

    b=a.values.reshape(2,2)
    

    I think it will help you. u can directly use only reshape() function.but it will give future warning

提交回复
热议问题