Datasets:
Update golf.py
Browse files
golf.py
CHANGED
|
@@ -80,7 +80,9 @@ class Golf(datasets.GeneratorBasedBuilder):
|
|
| 80 |
|
| 81 |
yield row_id, data_row
|
| 82 |
|
| 83 |
-
def preprocess(self, data: pandas.DataFrame) -> pandas.DataFrame:
|
|
|
|
|
|
|
| 84 |
for feature in _ENCODING_DICS:
|
| 85 |
encoding_function = partial(self.encode, feature)
|
| 86 |
data.loc[:, feature] = data[feature].apply(encoding_function)
|
|
|
|
| 80 |
|
| 81 |
yield row_id, data_row
|
| 82 |
|
| 83 |
+
def preprocess(self, data: pandas.DataFrame) -> pandas.DataFrame:
|
| 84 |
+
print(data.dtype)
|
| 85 |
+
print(data.windy.unique())
|
| 86 |
for feature in _ENCODING_DICS:
|
| 87 |
encoding_function = partial(self.encode, feature)
|
| 88 |
data.loc[:, feature] = data[feature].apply(encoding_function)
|