046f6b64c1ac5cb6b03e5ee3cca26f9ddc84ae95,auto_ml/utils.py,BasicDataCleaning,turn_strings_to_floats,#BasicDataCleaning#Any#Any#,34
Before Change
else:
for row in X:
for key, val in row.items():
try:
row[key] = float(val)
except:
pass
return X
def transform(self, X, y=None):
After Change
col_desc = self.column_descriptions.get(key)
if col_desc == "categorical":
row[key] = str(val)
elif col_desc in (None, "continuous", "numerical", "float", "int"):
row[key] = float(val)
else:
// covers cases for dates, target, etc.
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
Project Name: ClimbsRocks/auto_ml
Commit Name: 046f6b64c1ac5cb6b03e5ee3cca26f9ddc84ae95
Time: 2016-08-12
Author: ClimbsBytes@gmail.com
File Name: auto_ml/utils.py
Class Name: BasicDataCleaning
Method Name: turn_strings_to_floats
Project Name: deepmipt/DeepPavlov
Commit Name: 0a8c536f70ae5b58a983e130b46d0daddb25a0bb
Time: 2017-12-29
Author: yoptar@gmail.com
File Name: deeppavlov/core/commands/utils.py
Class Name:
Method Name: set_usr_dir
Project Name: ray-project/ray
Commit Name: c54853d45b9d5084a3f91d492887e2e859ee995a
Time: 2020-09-03
Author: ian.rodney@gmail.com
File Name: python/ray/autoscaler/command_runner.py
Class Name: DockerCommandRunner
Method Name: _check_docker_installed
Project Name: NervanaSystems/nlp-architect
Commit Name: 20b2bad67d4274ee0f0455699f4c413c2b3c1a69
Time: 2018-07-19
Author: anna.bethke@gmail.com
File Name: nlp_architect/utils/generic.py
Class Name:
Method Name: to_one_hot