Pandas - Cumsum, skip row if condition based on the resulting accumulated value

前端 未结 0 1543
栀梦
栀梦 2021-01-28 07:17

How to accumulate values skipping rows if the accumulated result of those rows exceeds a certain threshold?

threshold = 120
Col1
---
100
5
90
5
8

Expected output         


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