mstz commited on
Commit
ee98e6a
·
1 Parent(s): 397f90b

Update car.py

Browse files
Files changed (1) hide show
  1. car.py +2 -2
car.py CHANGED
@@ -152,10 +152,10 @@ class Car(datasets.GeneratorBasedBuilder):
152
 
153
  for feature in _ENCODING_DICS:
154
  encoding_function = partial(self.encode, feature)
155
- data.loc[:, feature] = data[feature].apply(encoding_function)
156
 
157
  if config == "car_binary":
158
- data.loc[:, "acceptability_level"] = data["acceptability_level"].apply(lambda x: 0 if x == 0 else 1)
159
 
160
 
161
  return data
 
152
 
153
  for feature in _ENCODING_DICS:
154
  encoding_function = partial(self.encode, feature)
155
+ data[feature] = data[feature].apply(encoding_function)
156
 
157
  if config == "car_binary":
158
+ data["acceptability_level"] = data["acceptability_level"].apply(lambda x: 0 if x == 0 else 1)
159
 
160
 
161
  return data