Skip to content

mecfs_bio.build_system.task.pipes.drop_nan_pipe

Classes:

DropNanPipe

Bases: DataProcessingPipe

Methods:

Attributes:

cols instance-attribute

cols: list[str]

process

process(x: LazyFrame) -> narwhals.LazyFrame
Source code in mecfs_bio/build_system/task/pipes/drop_nan_pipe.py
def process(self, x: narwhals.LazyFrame) -> narwhals.LazyFrame:
    for col in self.cols:
        x = x.filter(~narwhals.col(col).is_nan())
    return x