mstz commited on
Commit
7da7188
1 Parent(s): 0b8f537

Update annealing.py

Browse files
Files changed (1) hide show
  1. annealing.py +2 -1
annealing.py CHANGED
@@ -62,7 +62,6 @@ urls_per_split = {
62
  features_types_per_config = {
63
  "annealing": {
64
  "family": datasets.Value("string"),
65
- "product_type": datasets.Value("string"),
66
  "steel_type": datasets.Value("string"),
67
  "carbon": datasets.Value("float64"),
68
  "hardness": datasets.Value("float64"),
@@ -148,6 +147,8 @@ class Anneal(datasets.GeneratorBasedBuilder):
148
  # data = data[data.formability != "?"]
149
  # data = data[data.enamelability != "?"]
150
 
 
 
151
  data.loc[:, "formability"] = data.formability.apply(lambda x: int(x) if x not in ("?", "-") else 0)
152
  data.loc[:, "enamelability"] = data.enamelability.apply(lambda x: int(x) if x not in ("?", "-") else 0)
153
  data.loc[:, "non_ageing"] = data.formability.apply(lambda x: True if x == "-" else False)
 
62
  features_types_per_config = {
63
  "annealing": {
64
  "family": datasets.Value("string"),
 
65
  "steel_type": datasets.Value("string"),
66
  "carbon": datasets.Value("float64"),
67
  "hardness": datasets.Value("float64"),
 
147
  # data = data[data.formability != "?"]
148
  # data = data[data.enamelability != "?"]
149
 
150
+ data.drop("product_type", axis="columns", inplace=True)
151
+
152
  data.loc[:, "formability"] = data.formability.apply(lambda x: int(x) if x not in ("?", "-") else 0)
153
  data.loc[:, "enamelability"] = data.enamelability.apply(lambda x: int(x) if x not in ("?", "-") else 0)
154
  data.loc[:, "non_ageing"] = data.formability.apply(lambda x: True if x == "-" else False)