mstz commited on
Commit
13e8057
1 Parent(s): 90149b3

Update isolet.py

Browse files
Files changed (1) hide show
  1. isolet.py +3 -3
isolet.py CHANGED
@@ -65,8 +65,8 @@ class Isolet(datasets.GeneratorBasedBuilder):
65
  def _generate_examples(self, filepath: str):
66
  data = pandas.read_csv(filepath + "/isolet1+2+3+4.data", header=None).infer_objects()
67
  data = self.preprocess(data, config=self.config.name)
68
- print(f"reading {filepath}/isolet1+2+3+4.data")
69
-
70
  for row_id, row in data.iterrows():
71
  data_row = dict(row)
72
 
@@ -75,7 +75,7 @@ class Isolet(datasets.GeneratorBasedBuilder):
75
  def preprocess(self, data: pandas.DataFrame, config: str = DEFAULT_CONFIG) -> pandas.DataFrame:
76
  data.columns = [str(i) for i in range(618)]
77
  data.loc[:, "617"] = data["617"].apply(int)
78
- data = data.astype({"617": "int8"})
79
  data = data.astype({str(i): "float64" for i in range(617)})
 
80
 
81
  return data
 
65
  def _generate_examples(self, filepath: str):
66
  data = pandas.read_csv(filepath + "/isolet1+2+3+4.data", header=None).infer_objects()
67
  data = self.preprocess(data, config=self.config.name)
68
+ print(data.dtypes)
69
+
70
  for row_id, row in data.iterrows():
71
  data_row = dict(row)
72
 
 
75
  def preprocess(self, data: pandas.DataFrame, config: str = DEFAULT_CONFIG) -> pandas.DataFrame:
76
  data.columns = [str(i) for i in range(618)]
77
  data.loc[:, "617"] = data["617"].apply(int)
 
78
  data = data.astype({str(i): "float64" for i in range(617)})
79
+ data = data.astype({"617": "int8"})
80
 
81
  return data