Update sg-holiday.py
Browse files- sg-holiday.py +3 -5
sg-holiday.py
CHANGED
@@ -51,11 +51,9 @@ class TimesOfHoliday(datasets.GeneratorBasedBuilder):
|
|
51 |
]
|
52 |
|
53 |
def _generate_examples(self, path=None):
|
54 |
-
|
55 |
-
|
56 |
-
csv_reader
|
57 |
-
csv_file, quotechar='"', delimiter=",", skipinitialspace=True, quoting=csv.QUOTE_ALL
|
58 |
-
)
|
59 |
for id_, row in enumerate(csv_reader):
|
60 |
Date, Day, Holiday = row
|
61 |
yield id_, {
|
|
|
51 |
]
|
52 |
|
53 |
def _generate_examples(self, path=None):
|
54 |
+
with open(filepath, encoding='utf-8') as f:
|
55 |
+
csv_reader = csv.reader(f, quotechar='"', delimiter=",", quoting=csv.QUOTE_ALL, skipinitialspace=True)
|
56 |
+
next(csv_reader)
|
|
|
|
|
57 |
for id_, row in enumerate(csv_reader):
|
58 |
Date, Day, Holiday = row
|
59 |
yield id_, {
|