Skip to content

mecfs_bio.build_system.task.pipes.str_lowercase_pipe

Classes:

StrLowercasePipe

Bases: DataProcessingPipe

Methods:

Attributes:

new_column_name instance-attribute

new_column_name: str

target_column instance-attribute

target_column: str

process

process(x: LazyFrame) -> narwhals.LazyFrame
Source code in mecfs_bio/build_system/task/pipes/str_lowercase_pipe.py
def process(self, x: narwhals.LazyFrame) -> narwhals.LazyFrame:
    return x.with_columns(
        narwhals.col(self.target_column)
        .str.to_lowercase()
        .alias(self.new_column_name)
    )