lisa.utils.ffill#
- lisa.utils.ffill(iterator, select=<function <lambda>>, init=None)[source]#
Forward fill an iterator with the last selected value.
- Parameters:
iterator (collections.abc.Iterable) – Iterator to fill.
select (collections.abc.Callable) – Select items to preserve (return
True
) and items to replace with the last selected value (returnFalse
).init (object) – Value to use before the first
select
-ed item.