deepfos.lib.utils.dict_to_expr¶
- deepfos.lib.utils.dict_to_expr(dict_, hierarchy=None)¶
字典转化为维度表达式
>>> dict_to_expr({ ... "Year": ['2021', '2022'], ... "Entity": 'TotalEntity', ... "Version": "Base(NoVersion,0)" ... }) 'Year{2021;2022}->Entity{TotalEntity}->Version{Base(NoVersion,0)}' >>> dict_to_expr({ ... "Year": ['2021', '2022'], ... "Entity": 'TotalEntity', ... }, hierarchy='Base') 'Year{Base(2021,0);Base(2022,0)}->Entity{Base(TotalEntity,0)}'