Datasets:
Upload nbfi.py
Browse files
nbfi.py
CHANGED
@@ -227,10 +227,10 @@ class NBFI(datasets.GeneratorBasedBuilder):
|
|
227 |
data = data[~data.Credit_Amount.isna()]
|
228 |
data = data[~data.Loan_Annuity.isna()]
|
229 |
data = data[~data.Accompany_Client.isna()]
|
230 |
-
data = data[~data.Population_Region_Relative.isna()]
|
231 |
data = data[~data.Client_Occupation.isna()]
|
232 |
data = data[~data.Client_Family_Members.isna()]
|
233 |
data = data[~data.Social_Circle_Default.isna()]
|
|
|
234 |
|
235 |
data.columns = _BASE_FEATURE_NAMES
|
236 |
|
@@ -246,6 +246,7 @@ class NBFI(datasets.GeneratorBasedBuilder):
|
|
246 |
data["was_reachable_at_work"] = data["was_reachable_at_work"].apply(bool)
|
247 |
data["same_residence_and_home"] = data["same_residence_and_home"].apply(bool)
|
248 |
data["same_work_and_home"] = data["same_work_and_home"].apply(bool)
|
|
|
249 |
|
250 |
data = data.astype({
|
251 |
"is_male": "bool",
|
|
|
227 |
data = data[~data.Credit_Amount.isna()]
|
228 |
data = data[~data.Loan_Annuity.isna()]
|
229 |
data = data[~data.Accompany_Client.isna()]
|
|
|
230 |
data = data[~data.Client_Occupation.isna()]
|
231 |
data = data[~data.Client_Family_Members.isna()]
|
232 |
data = data[~data.Social_Circle_Default.isna()]
|
233 |
+
data = data[[~data.Population_Region_Relative.isin(("@", "#"))]]
|
234 |
|
235 |
data.columns = _BASE_FEATURE_NAMES
|
236 |
|
|
|
246 |
data["was_reachable_at_work"] = data["was_reachable_at_work"].apply(bool)
|
247 |
data["same_residence_and_home"] = data["same_residence_and_home"].apply(bool)
|
248 |
data["same_work_and_home"] = data["same_work_and_home"].apply(bool)
|
249 |
+
data["residence_density"] = data["residence_density"].apply(float)
|
250 |
|
251 |
data = data.astype({
|
252 |
"is_male": "bool",
|