rdpahalavan commited on
Commit
4ad0971
1 Parent(s): 5d0c5dc

Update CIC-IDS2017.py

Browse files
Files changed (1) hide show
  1. CIC-IDS2017.py +2 -2
CIC-IDS2017.py CHANGED
@@ -46,8 +46,8 @@ class NewDataset(datasets.GeneratorBasedBuilder):
46
  def _info(self):
47
  filepath = _URLS[self.config.name]
48
  csv_file = pyarrow.csv.open_csv(filepath)
49
- columns = csv_file.schema.names
50
- features = {column: datasets.Value("string") for column in columns}
51
  return datasets.DatasetInfo(
52
  description=_DESCRIPTION,
53
  features=datasets.Features(features),
 
46
  def _info(self):
47
  filepath = _URLS[self.config.name]
48
  csv_file = pyarrow.csv.open_csv(filepath)
49
+ schema = csv_file.schema
50
+ features = datasets.Features.from_arrow_schema(schema)
51
  return datasets.DatasetInfo(
52
  description=_DESCRIPTION,
53
  features=datasets.Features(features),