Datasets:
Update mushroom.py
Browse files- mushroom.py +2 -1
mushroom.py
CHANGED
@@ -312,7 +312,8 @@ class Mushroom(datasets.GeneratorBasedBuilder):
|
|
312 |
def preprocess(self, data: pandas.DataFrame, config: str = DEFAULT_CONFIG) -> pandas.DataFrame:
|
313 |
data.columns = _ORIGINAL_FEATURE_NAMES
|
314 |
print(data.columns)
|
315 |
-
|
|
|
316 |
data = data[features_types_per_config[config].keys()]
|
317 |
|
318 |
for feature in _ENCODING_DICS:
|
|
|
312 |
def preprocess(self, data: pandas.DataFrame, config: str = DEFAULT_CONFIG) -> pandas.DataFrame:
|
313 |
data.columns = _ORIGINAL_FEATURE_NAMES
|
314 |
print(data.columns)
|
315 |
+
if "stalk_root" in data.columns:
|
316 |
+
data.drop("stalk_root", axis="columns", inplace=True)
|
317 |
data = data[features_types_per_config[config].keys()]
|
318 |
|
319 |
for feature in _ENCODING_DICS:
|