Skip to content

mecfs_bio.build_system.task.pipes.transpose_pipe

Classes:

TransposePipe

Bases: DataProcessingPipe

Pipe to transpose a DataFrame Materializes data; Intended to run on small DataFrames.

Methods:

process

process(x: LazyFrame) -> narwhals.LazyFrame
Source code in mecfs_bio/build_system/task/pipes/transpose_pipe.py
def process(self, x: narwhals.LazyFrame) -> narwhals.LazyFrame:
    return narwhals.from_native(
        x.collect().to_pandas().transpose().reset_index()
    ).lazy()