File size: 918 Bytes
3fd9e55 7970a34 3fd9e55 cac0f89 3fd9e55 7970a34 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
---
configs:
- config_name: default
data_files: "data.csv"
delimiter: "|"
header: 1
names: ["kind", "sound"]
size_categories:
- n<1K
---
# [doc] formats - csv - 3
This dataset contains one csv file at the root:
- [data.csv](./data.csv)
```csv
# ignored comment
col1|col2
dog|woof
cat|meow
pokemon|pika
human|hello
```
We define the config name in the YAML config, as well as the exact location of the file, the separator as `"|"`, the name of the columns, and the number of rows to ignore (the row #1 is a row of column headers, that will be replaced by the `names` option, and the row #0 is ignored). The reference for the options is the [documentation of pandas.read_csv()](https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html).
```yaml
---
configs:
- config_name: default
data_files: "data.csv"
delimiter: "|"
header: 1
names: ["kind", "sound"]
size_categories:
- n<1K
---
```
|