Datasets:
Upload nbfi.py
Browse files
nbfi.py
CHANGED
@@ -222,6 +222,7 @@ class NBFI(datasets.GeneratorBasedBuilder):
|
|
222 |
data.columns = _BASE_FEATURE_NAMES
|
223 |
|
224 |
data["education_level"] = data["education_level"].apply(lambda x: _EDUCATION_ENCODING[x])
|
|
|
225 |
data["owns_a_car"] = data["owns_a_car"].apply(bool)
|
226 |
data["owns_a_bike"] = data["owns_a_bike"].apply(bool)
|
227 |
data["has_an_active_loan"] = data["has_an_active_loan"].apply(bool)
|
|
|
222 |
data.columns = _BASE_FEATURE_NAMES
|
223 |
|
224 |
data["education_level"] = data["education_level"].apply(lambda x: _EDUCATION_ENCODING[x])
|
225 |
+
data["is_male"] = data["is_male"].apply(lambda x: x == "M")
|
226 |
data["owns_a_car"] = data["owns_a_car"].apply(bool)
|
227 |
data["owns_a_bike"] = data["owns_a_bike"].apply(bool)
|
228 |
data["has_an_active_loan"] = data["has_an_active_loan"].apply(bool)
|