Datasets:
Upload nbfi.py
Browse files
nbfi.py
CHANGED
@@ -219,12 +219,9 @@ class NBFI(datasets.GeneratorBasedBuilder):
|
|
219 |
data = data[~data.Client_Permanent_Match_Tag.isna()]
|
220 |
data = data[~data.Client_Contact_Work_Tag.isna()]
|
221 |
|
222 |
-
print(len(data.columns))
|
223 |
-
print(len(_BASE_FEATURE_NAMES))
|
224 |
-
for d, f in zip(data.columns, _BASE_FEATURE_NAMES):
|
225 |
-
print(d, f)
|
226 |
data.columns = _BASE_FEATURE_NAMES
|
227 |
|
|
|
228 |
data.iloc[:, "owns_a_car"] = data["owns_a_car"].apply(bool)
|
229 |
data.iloc[:, "owns_a_bike"] = data["owns_a_bike"].apply(bool)
|
230 |
data.iloc[:, "has_an_active_loan"] = data["has_an_active_loan"].apply(bool)
|
|
|
219 |
data = data[~data.Client_Permanent_Match_Tag.isna()]
|
220 |
data = data[~data.Client_Contact_Work_Tag.isna()]
|
221 |
|
|
|
|
|
|
|
|
|
222 |
data.columns = _BASE_FEATURE_NAMES
|
223 |
|
224 |
+
print(data["owns_a_car"].apply(bool).shape, data.shape)
|
225 |
data.iloc[:, "owns_a_car"] = data["owns_a_car"].apply(bool)
|
226 |
data.iloc[:, "owns_a_bike"] = data["owns_a_bike"].apply(bool)
|
227 |
data.iloc[:, "has_an_active_loan"] = data["has_an_active_loan"].apply(bool)
|