apply_residuals

function of dascore.io.index.query source

apply_residuals(
    df: DataFrame ,
    residuals: list[tuple[str, Pattern]] ,
    attr_columns: dict[dict[str, Series], None] = None,
)-> ‘pd.DataFrame’

Apply regex residual filters to the flat relation.

Residuals are produced only for attr predicates, so when attr_columns is given the original attr series is preferred over the flat column of the same name — the flat column can instead hold a coordinate envelope when the attr name collided with one.