Datasets:
Update isolet.py
Browse files
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(
|
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
|