mstz commited on
Commit
304af8f
·
1 Parent(s): 0a3c7b4

Update wine.py

Browse files
Files changed (1) hide show
  1. wine.py +1 -1
wine.py CHANGED
@@ -93,7 +93,7 @@ class Wine(datasets.GeneratorBasedBuilder):
93
  yield row_id, data_row
94
 
95
  def preprocess(self, data: pandas.DataFrame, config: str = DEFAULT_CONFIG) -> pandas.DataFrame:
96
- data.columns = _BASE_FEATURE_NAMES
97
  data.loc[data.is_red == "red", "color"] = 0
98
  data.loc[data.is_red == "white", "color"] = 1
99
 
 
93
  yield row_id, data_row
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", "color"] = 0
98
  data.loc[data.is_red == "white", "color"] = 1
99