rdpahalavan commited on
Commit
2eff270
1 Parent(s): 3115a3e

Update CIC-IDS2017.py

Browse files
Files changed (1) hide show
  1. CIC-IDS2017.py +7 -7
CIC-IDS2017.py CHANGED
@@ -56,10 +56,10 @@ class CICIDS2017(datasets.GeneratorBasedBuilder):
56
  ]
57
 
58
  def _generate_examples(self, filepath):
59
- with open(filepath, encoding="utf-8") as csv_file:
60
- csv_reader = csv.DictReader(csv_file)
61
- for id_, row in enumerate(csv_reader):
62
- yield id_, {
63
- 'flow_id': row['flow_id'],
64
- 'attack_label': row['attack_label']
65
- }
 
56
  ]
57
 
58
  def _generate_examples(self, filepath):
59
+ with open(filepath, encoding="utf-8") as csv_file:
60
+ csv_reader = csv.DictReader(csv_file)
61
+ for id_, row in enumerate(csv_reader):
62
+ yield id_, {
63
+ 'flow_id': row['flow_id'],
64
+ 'attack_label': row['attack_label']
65
+ }