Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] CSV Writer ignores the header parameter when no metadata is provided #6669

Closed
vuule opened this issue Nov 4, 2020 · 2 comments · Fixed by #8740
Closed

[BUG] CSV Writer ignores the header parameter when no metadata is provided #6669

vuule opened this issue Nov 4, 2020 · 2 comments · Fixed by #8740
Assignees
Labels
bug Something isn't working cuIO cuIO issue good first issue Good for newcomers libcudf Affects libcudf (C++/CUDA) code.

Comments

@vuule
Copy link
Contributor

vuule commented Nov 4, 2020

CSV writer doesn't include column names if metadata is not present, even if header parameter is set to true.

The CSV reader automatically generates column names if input does not have a header. Thus, current writer behavior causes the first row to be read as column names when using default parameters for both reading and writing:

  cudf_io::csv_writer_options writer_options =
    cudf_io::csv_writer_options::builder(cudf_io::sink_info{"issue.csv"}, table);
  cudf_io::write_csv(writer_options);

  cudf_io::csv_reader_options read_options =
    cudf_io::csv_reader_options::builder(udf_io::source_info{"issue.csv"});
  cudf_io::read_csv(read_options);

The APIs should work well with default parameters.

Note: this behavior is never exercised in tests because all write_csv tests use write_csv_helper, which always sets the metadata.

@vuule vuule added bug Something isn't working good first issue Good for newcomers cuIO cuIO issue libcudf Affects libcudf (C++/CUDA) code. labels Nov 4, 2020
@github-actions
Copy link

This issue has been marked rotten due to no recent activity in the past 90d. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.

@github-actions
Copy link

This issue has been marked stale due to no recent activity in the past 30d. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be marked rotten if there is no activity in the next 60d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cuIO cuIO issue good first issue Good for newcomers libcudf Affects libcudf (C++/CUDA) code.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants