You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I confirm that column_names values are not copied to names variable because in this case CsvConfig.__post_init__ is not called: CsvConfig is instantiated with default values and afterwards the config_kwargs are used to overwrite its attributes.
@luismsgomes in the meantime, you can avoid the bug if you pass names instead of column_names.
Describe the bug
load_dataset() ignores the column_names kwarg when loading a CSV file. Instead, it uses whatever values are on the first line of the file.
Steps to reproduce the bug
Call
load_dataset
to load data from a CSV file and specifycolumn_names
kwarg.Expected behavior
The resulting dataset should have the specified column names and the first line of the file should be considered as data values.
Environment info
datasets
version: 2.20.0huggingface_hub
version: 0.24.2fsspec
version: 2024.5.0The text was updated successfully, but these errors were encountered: