Datasets:
Upload monks.py
Browse files
monks.py
CHANGED
@@ -165,8 +165,9 @@ class Monk(datasets.GeneratorBasedBuilder):
|
|
165 |
|
166 |
def preprocess(self, data: pandas.DataFrame, config: str = "monks1") -> pandas.DataFrame:
|
167 |
print(data.head())
|
168 |
-
data.columns = _BASE_FEATURE_NAMES
|
169 |
data.drop("ID", axis="columns", inplace=True)
|
|
|
170 |
data.loc[:, "has_tie"] = data.has_tie.apply(bool)
|
171 |
data.loc[:, "is_smiling"] = data.is_smiling.apply(bool)
|
172 |
|
|
|
165 |
|
166 |
def preprocess(self, data: pandas.DataFrame, config: str = "monks1") -> pandas.DataFrame:
|
167 |
print(data.head())
|
168 |
+
data.columns = ["empty"] + _BASE_FEATURE_NAMES
|
169 |
data.drop("ID", axis="columns", inplace=True)
|
170 |
+
data.drop("empty", axis="columns", inplace=True)
|
171 |
data.loc[:, "has_tie"] = data.has_tie.apply(bool)
|
172 |
data.loc[:, "is_smiling"] = data.is_smiling.apply(bool)
|
173 |
|