error 'numpy.float64' object has no attribute 'shift' after applying function

前端 未结 0 1933
無奈伤痛
無奈伤痛 2021-01-14 05:27

Hi I try to create new column "state" based on this function:

def state (row):
if (np.sign(row) == np.sign(row).shift(1)) and (row > 1):
    retu         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题