INNER CODE UNIT · Python

__init__

pdpipe/pdpipe · src/pdpipe/core.py:263

    def __init__(self, stage: "PdPipelineStage", fit: Optional[bool] = False):
        self.stage = stage
        self.fit = fit

    def __enter__(self):
        self.stage._is_being_applied = True
        if self.fit:
            self.stage._is_being_fitted = True
        return None

    def __exit__(self, exc_type, exc_val, exc_tb):
        self.stage._is_being_applied = False
        self.stage._is_being_fitted = False


class PdPipelineStage(abc.ABC):
    """A stage of a pandas DataFrame-processing pipeline.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…