Pandas column that depends on its previous value (row)?

后端 未结 0 1433
花落未央
花落未央 2020-12-02 00:43

I would like my 3rd column to start at 0.

Its next value is its previous value plus df.below_lo[i] (if the previous value was 0).

If its previous value was 1,

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