JP-SystemsX
commited on
Commit
•
3ab377c
1
Parent(s):
3dee83d
minor bug fix
Browse files- super_eurlex.py +2 -1
super_eurlex.py
CHANGED
@@ -424,7 +424,8 @@ class SuperEurlex(datasets.GeneratorBasedBuilder):
|
|
424 |
meta_data['celex_id'] = meta_data['celex_id'].apply(lambda x: str(x.tolist()[0]) if isinstance(x, np.ndarray) else x)
|
425 |
combined_data = pd.merge(text_data, meta_data, on='celex_id')
|
426 |
dataset = datasets.Dataset.from_pandas(combined_data)
|
427 |
-
|
|
|
428 |
for i, sample in enumerate(dataset):
|
429 |
yield i, sample
|
430 |
|
|
|
424 |
meta_data['celex_id'] = meta_data['celex_id'].apply(lambda x: str(x.tolist()[0]) if isinstance(x, np.ndarray) else x)
|
425 |
combined_data = pd.merge(text_data, meta_data, on='celex_id')
|
426 |
dataset = datasets.Dataset.from_pandas(combined_data)
|
427 |
+
if '__index_level_0__' in dataset.column_names:
|
428 |
+
dataset = dataset.remove_columns('__index_level_0__')
|
429 |
for i, sample in enumerate(dataset):
|
430 |
yield i, sample
|
431 |
|