Datasets:
Upload bank.py
Browse files
bank.py
CHANGED
@@ -149,11 +149,11 @@ class Bank(datasets.GeneratorBasedBuilder):
|
|
149 |
raise ValueError(f"Unknown config: {config}")
|
150 |
|
151 |
def encoding_dictionaries(self):
|
152 |
-
education_dic,
|
153 |
education_data = [("education", education, code) for education, code in education_dic.items()]
|
154 |
-
loan_data = [("loan", loan, code) for loan, code in
|
155 |
-
housing_data = [("housing", housing, code) for housing, code in
|
156 |
-
default_data = [("default", default, code) for default, code in
|
157 |
data = pandas.DataFrame(education_data, loan_data + housing_data + default_data,
|
158 |
columns=["feature", "original_value", "encoded_value"])
|
159 |
|
|
|
149 |
raise ValueError(f"Unknown config: {config}")
|
150 |
|
151 |
def encoding_dictionaries(self):
|
152 |
+
education_dic, yes_no_dic = self.education_encoding_dic(), self.yes_no_encoding_dic()
|
153 |
education_data = [("education", education, code) for education, code in education_dic.items()]
|
154 |
+
loan_data = [("loan", loan, code) for loan, code in yes_no_dic.items()]
|
155 |
+
housing_data = [("housing", housing, code) for housing, code in yes_no_dic.items()]
|
156 |
+
default_data = [("default", default, code) for default, code in yes_no_dic.items()]
|
157 |
data = pandas.DataFrame(education_data, loan_data + housing_data + default_data,
|
158 |
columns=["feature", "original_value", "encoded_value"])
|
159 |
|