Linked Questions

Popular Questions

Cumulative View of Booleans

Asked by At

If I have a series that is [False, False, True, False, True, False]

I would like to return a cumulative view of [False, False, True, True, True, True]

Right now I tend to use cumsum and then follow up with a np.where(series > 0, True, False).

But I'm wondering if there is a more efficient way to do this.

Related Questions