We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f632f0e commit 514f963Copy full SHA for 514f963
analyze/dnn/utils.py
@@ -76,6 +76,8 @@ def encode_minmax(df, name):
76
"""
77
Encodes the named column in the dataframe via min max.
78
79
+ # replace missing values (NaN) with a 0
80
+ df[name].fillna(0,inplace=True)
81
min_max_scaler = preprocessing.MinMaxScaler()
82
print(colored("encode_minmax " + name, "yellow"))
83
df[[name]] = min_max_scaler.fit_transform(df[[name]])
0 commit comments