Datasets:
Upload spect.py
Browse files
spect.py
CHANGED
|
@@ -143,9 +143,9 @@ class Spect(datasets.GeneratorBasedBuilder):
|
|
| 143 |
def _generate_examples(self, filepath: str):
|
| 144 |
data = pandas.read_csv(filepath, header=None)
|
| 145 |
features = list(features_types_per_config[self.config.name])
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
|
| 150 |
for row_id, row in data.iterrows():
|
| 151 |
data_row = dict(row)
|
|
|
|
| 143 |
def _generate_examples(self, filepath: str):
|
| 144 |
data = pandas.read_csv(filepath, header=None)
|
| 145 |
features = list(features_types_per_config[self.config.name])
|
| 146 |
+
base_features = [features[-1]] + features[:-1]
|
| 147 |
+
data.columns = base_features
|
| 148 |
+
data = data[features]
|
| 149 |
|
| 150 |
for row_id, row in data.iterrows():
|
| 151 |
data_row = dict(row)
|