deepfos.lib.utils.expr_to_dict¶
- deepfos.lib.utils.expr_to_dict(expr)¶
维度表达式转化为字典
>>> d = expr_to_dict('Year{Base(2021,0);Base(2022,0)}->Entity{Base(TotalEntity,0)}') >>> d == { ... 'Year': 'Base(2021,0);Base(2022,0)', ... 'Entity': 'Base(TotalEntity,0)' ... } True >>> expr = 'Year{Base(2021,0);Base(2022,0)}->Entity{Base(TotalEntity,0)}' >>> expr == dict_to_expr(expr_to_dict(expr)) True