1.优化事件分析分组
This commit is contained in:
parent
27501bda49
commit
cc48dada37
@ -392,6 +392,8 @@ async def event_model(
|
||||
if item.get('groups'):
|
||||
item['groups'] = np.array(item['groups'])[sort_key].tolist()
|
||||
groups = []
|
||||
groupbys=analysis.event_view.get('groupBy')
|
||||
groupby_list=[i['columnName'] for i in groupbys]
|
||||
for gitem in item['groups']:
|
||||
gb = []
|
||||
if '(' in gitem or '[' in gitem:
|
||||
@ -409,8 +411,14 @@ async def event_model(
|
||||
gb.insert(idx, name)
|
||||
|
||||
# 去掉分组表现里面的''
|
||||
appgb = str(gb).replace("'", '')
|
||||
groups.append(appgb)
|
||||
# appgb = str(gb).replace("'", '')
|
||||
# groups.append(appgb)
|
||||
# item['groups'] = groups
|
||||
#修改后的方案
|
||||
by_dict={}
|
||||
for i in range(len(gb)):
|
||||
by_dict[groupby_list[i]]=gb[i]
|
||||
groups.append(by_dict)
|
||||
item['groups'] = groups
|
||||
else:
|
||||
if group_label:
|
||||
|
Loading…
Reference in New Issue
Block a user