mstz commited on
Commit
8ec8b31
1 Parent(s): bfdd22d

Upload nbfi.py

Browse files
Files changed (1) hide show
  1. nbfi.py +9 -11
nbfi.py CHANGED
@@ -223,17 +223,15 @@ class NBFI(datasets.GeneratorBasedBuilder):
223
 
224
  print(data["owns_a_car"].apply(bool).shape, data.shape)
225
  data["owns_a_car"] = data["owns_a_car"].apply(bool)
226
- print(data.dtypes["owns_a_car"])
227
- print(data["owns_a_car"])
228
- data.iloc[:, "owns_a_bike"] = data["owns_a_bike"].apply(bool)
229
- data.iloc[:, "has_an_active_loan"] = data["has_an_active_loan"].apply(bool)
230
- data.iloc[:, "owns_a_house"] = data["owns_a_house"].apply(bool)
231
- data.iloc[:, "is_male"] = data["is_male"].apply(bool)
232
- data.iloc[:, "has_provided_a_mobile_number"] = data["has_provided_a_mobile_number"].apply(bool)
233
- data.iloc[:, "has_provided_a_home_number"] = data["has_provided_a_home_number"].apply(bool)
234
- data.iloc[:, "was_reachable_at_work"] = data["was_reachable_at_work"].apply(bool)
235
- data.iloc[:, "same_residence_and_home"] = data["same_residence_and_home"].apply(bool)
236
- data.iloc[:, "same_work_and_home"] = data["same_work_and_home"].apply(bool)
237
 
238
  return data[list(features_types_per_config[config].keys())]
239
 
 
223
 
224
  print(data["owns_a_car"].apply(bool).shape, data.shape)
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)
228
+ data["owns_a_house"] = data["owns_a_house"].apply(bool)
229
+ data["is_male"] = data["is_male"].apply(bool)
230
+ data["has_provided_a_mobile_number"] = data["has_provided_a_mobile_number"].apply(bool)
231
+ data["has_provided_a_home_number"] = data["has_provided_a_home_number"].apply(bool)
232
+ data["was_reachable_at_work"] = data["was_reachable_at_work"].apply(bool)
233
+ data["same_residence_and_home"] = data["same_residence_and_home"].apply(bool)
234
+ data["same_work_and_home"] = data["same_work_and_home"].apply(bool)
 
 
235
 
236
  return data[list(features_types_per_config[config].keys())]
237