Datasets:
Update wine.py
Browse files
wine.py
CHANGED
@@ -94,8 +94,8 @@ class Wine(datasets.GeneratorBasedBuilder):
|
|
94 |
|
95 |
def preprocess(self, data: pandas.DataFrame, config: str = DEFAULT_CONFIG) -> pandas.DataFrame:
|
96 |
data = data.rename(columns={"color": "is_red"})
|
97 |
-
data.loc[data.is_red == "red", "
|
98 |
-
data.loc[data.is_red == "white", "
|
99 |
|
100 |
return data
|
101 |
|
|
|
94 |
|
95 |
def preprocess(self, data: pandas.DataFrame, config: str = DEFAULT_CONFIG) -> pandas.DataFrame:
|
96 |
data = data.rename(columns={"color": "is_red"})
|
97 |
+
data.loc[data.is_red == "red", "is_red"] = 0
|
98 |
+
data.loc[data.is_red == "white", "is_red"] = 1
|
99 |
|
100 |
return data
|
101 |
|