I would like to use np.where by taking previous rows in marketstock zulauf (value: 1) plus bestaende in row 5 (value: 47) minus kufrie in row 5 (value: 0) but still get error
df['cumnew1'] = np.where((df.cumnew.shift(1) + df.bestaende - df.kufri05) < 0, 0,\
(df.cumnew.shift(1) + df.bestaende - df.kufri05) + df.marktzulauf)
Aucun commentaire:
Enregistrer un commentaire