Datasets:
Upload adult.py
Browse files
adult.py
CHANGED
@@ -215,7 +215,7 @@ class Adult(datasets.GeneratorBasedBuilder):
|
|
215 |
"race", "relationship", "sex", "workclass", "over_threshold"]]
|
216 |
data.columns = _BASE_FEATURE_NAMES
|
217 |
|
218 |
-
for feature in
|
219 |
encoding_function = partial(self.encode, feature)
|
220 |
data.loc[:, feature] = data[feature].apply(encoding_function)
|
221 |
|
|
|
215 |
"race", "relationship", "sex", "workclass", "over_threshold"]]
|
216 |
data.columns = _BASE_FEATURE_NAMES
|
217 |
|
218 |
+
for feature in _ENCODING_DICS:
|
219 |
encoding_function = partial(self.encode, feature)
|
220 |
data.loc[:, feature] = data[feature].apply(encoding_function)
|
221 |
|