We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba0a687 commit 931e6d1Copy full SHA for 931e6d1
src/sasctl/pzmm/write_score_code.py
@@ -632,13 +632,15 @@ def _predict_method(
632
column_names = ", ".join(f'"{col}"' for col in var_list)
633
# H2O models
634
if dtype_list:
635
- column_types = []
+ column_types = "{"
636
for var, dtype in zip(var_list, dtype_list):
637
if any(x in dtype for x in ["int", "float"]):
638
col_type = "numeric"
639
else:
640
col_type = "string"
641
- column_types.append(f'"{var}" : "{col_type}"')
+ column_types += f'"{var}" : "{col_type}", '
642
+ column_types = column_types.rstrip(", ")
643
+ column_types += "}"
644
cls.score_code += (
645
f"{'':4}input_array = pd.DataFrame("
646
f"[[{', '.join(var_list)}]],\n{'':31}columns=["
0 commit comments