Skip to content

mecfs_bio.build_system.task.pipes.cast_to_float32_pipe

Classes:

CastFloatsToFloat32Pipe

Bases: DataProcessingPipe

Convert all float64 columns to float32

Methods:

process

process(x: LazyFrame) -> narwhals.LazyFrame
Source code in mecfs_bio/build_system/task/pipes/cast_to_float32_pipe.py
def process(self, x: narwhals.LazyFrame) -> narwhals.LazyFrame:
    return x.with_columns(
        narwhals.selectors.by_dtype(narwhals.Float64).cast(narwhals.Float32)
    )