Datasets:
Update sentiment-dksf.py
Browse files- sentiment-dksf.py +2 -0
sentiment-dksf.py
CHANGED
@@ -43,6 +43,8 @@ class SentimentDKSF(datasets.GeneratorBasedBuilder):
|
|
43 |
csv_reader = csv.reader(
|
44 |
csv_file, quotechar='"', skipinitialspace=True
|
45 |
)
|
|
|
|
|
46 |
for id_, row in enumerate(csv_reader):
|
47 |
text, label = row
|
48 |
label = label2id(label)
|
|
|
43 |
csv_reader = csv.reader(
|
44 |
csv_file, quotechar='"', skipinitialspace=True
|
45 |
)
|
46 |
+
# skip the first row if your csv file has a header row
|
47 |
+
next(csv_reader, None)
|
48 |
for id_, row in enumerate(csv_reader):
|
49 |
text, label = row
|
50 |
label = label2id(label)
|