smmargins.Expr¶
- class smmargins.Expr(expr: str)¶
String expression wrapper for use in
values=.Strings in
values=are interpreted as reducer names (e.g."mean","p25"). To evaluate a pandas expression viadf.eval, wrap it inExpr(...).Example
>>> from smmargins import Expr >>> M.predict(values={"income": Expr("income * 1.10")})
- __init__(expr: str) None¶
Methods
__init__(expr)evaluate(frame)Attributes
expr