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