Commit adb6842f by lichenggang

没有检查到数量列则把其他数字列当成数量列

parent cf8635ca
Showing with 10 additions and 0 deletions
...@@ -144,6 +144,16 @@ class DicPredict(BasePredictor): ...@@ -144,6 +144,16 @@ class DicPredict(BasePredictor):
for col_nullrate in sort_li_nullrate[1:]: for col_nullrate in sort_li_nullrate[1:]:
temp_pre_model_res.pop(col_nullrate[0]) temp_pre_model_res.pop(col_nullrate[0])
# 如果没有数量列则把之前的序号列(其实是数字列)当成数字列
if not prob_num_cols:
num_col = None
for k, v in ab_result.items():
if v == '序号':
num_col = k
if num_col:
ab_result.pop(num_col)
temp_pre_model_res[num_col] = '数量'
model_id_res = { model_id_res = {
'std_result': temp_pre_model_res, 'std_result': temp_pre_model_res,
'ab_result': ab_result, 'ab_result': ab_result,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment