Also that can be used with 'not' to reverse it. Here the tilde means not, at ~b.percentile_between. An example ...
This is going for just those with high momentum in one direction or the other, screening out those in the middle between lo and hi like 30 and 70.
m is short for mask. &= is adding to the mask. There was also an 'a' to go with the 'b' which is added to columns. The semi-colon for two lines in one makes it easier to remove a factor with one comment (aside from the second one needed, in columns).
Anyway, figured this might help some of you who might want lows and highs, I found it helpful for efficiency in trying things and readability once accustomed to it.
b = MomentumRatio(window_length=wl, mask=m); m &= (~b.percentile_between(lo, hi))
m &= (~b.percentile_between(lo, hi)) simplifies needing to combine in two separate percentile_between like (percentile_between(0, 30) | percentile_between(70, 100)). For a shorter line less likely to wrap.