INNER CODE UNIT · Python
__enter__
pdpipe/pdpipe · src/pdpipe/core.py:267
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.
Parameters
----------
exraise : bool, default True
If true, a pdpipe.FailedPreconditionError is raised when this