mstz commited on
Commit
acbf4b9
1 Parent(s): d7b3c3b

Upload splice.py

Browse files
Files changed (1) hide show
  1. splice.py +3 -3
splice.py CHANGED
@@ -331,13 +331,13 @@ class Splice(datasets.GeneratorBasedBuilder):
331
  def preprocess(self, data: pandas.DataFrame) -> pandas.DataFrame:
332
  if self.config.name == "splice_IE":
333
  data["class"] = data["class"].apply(lambda x: 1 if x == "IE" else 0)
334
- data = data.rename(columns={"class", "is_ie"})
335
  elif self.config.name == "splice_IE":
336
  data["class"] = data["class"].apply(lambda x: 1 if x == "EI" else 0)
337
- data = data.rename(columns={"class", "is_ei"})
338
  elif self.config.name == "splice_N":
339
  data["class"] = data["class"].apply(lambda x: 1 if x == "N" else 0)
340
- data = data.rename(columns={"class", "is_n"})
341
  else:
342
  data["class"] = data["class"].apply(lambda x: {
343
  "EI": 0,
 
331
  def preprocess(self, data: pandas.DataFrame) -> pandas.DataFrame:
332
  if self.config.name == "splice_IE":
333
  data["class"] = data["class"].apply(lambda x: 1 if x == "IE" else 0)
334
+ data = data.rename(columns={"class": "is_ie"})
335
  elif self.config.name == "splice_IE":
336
  data["class"] = data["class"].apply(lambda x: 1 if x == "EI" else 0)
337
+ data = data.rename(columns={"class": "is_ei"})
338
  elif self.config.name == "splice_N":
339
  data["class"] = data["class"].apply(lambda x: 1 if x == "N" else 0)
340
+ data = data.rename(columns={"class": "is_n"})
341
  else:
342
  data["class"] = data["class"].apply(lambda x: {
343
  "EI": 0,