Skip to content

[R][Python] Expand coverage of and align R/Python to C++ CSV WriteOptions #34577

Closed

Description

@amoeba

Describe the enhancement requested

A user reported elsewhere that they couldn't set the delimiter in R's CsvWriteOptions$create in order to write, for example, a tab-delimited text file instead of a CSV. The signature is currently:

CsvWriteOptions$create <- function(include_header = TRUE, batch_size = 1024L, null_string = "") {}

Reference: arrow/r/R/csv.R

These arguments map to options offered in arrow/cpp/arrow/csv/options.h for WriteOptions which includes a delimiter option in addition to others:

  • bool include_header
  • int32_t batch_size
  • char delimiter
  • std::string null_string
  • std::string eol
  • QuotingStyle quoting_style

I also notice PyArrow has a different set of options in pyarrow.csv.WriteOptions than R does:

  • include_header
  • batch_size
  • delimiter
  • quoting_style

Reference: arrow/python/pyarrow/_csv.pyx

I think it would be really helpful if the full set of C++ CSV WriteOptions were available to both R and Python and that the set of options available in R and Python were identical. What do others think about aligning R and Python so all six C++ options are available to each? cc @thisisnic

Component(s)

Python, R

Activity

  1. thisisnic commented on Mar 30, 2023

    @thisisnic
    Member

    Exposing that functionality sounds good to me! The only small comment I have is that given that CSVWriteOptions$create() in R is an exported function, it'd be good to keep the existing arguments in the order they are now and add the new ones at the end.

  2. MartinNowak commented on Jul 2, 2025

    @MartinNowak
    Contributor

    R side apparently done with #36436 (8f347c5).

  3. github-actions commented on Jul 3, 2026

    @github-actions

    This issue has been marked as stale because it has had no activity in the past 365 days. Please remove the stale label or comment below, or this issue will be closed in 14 days. If this improvement is still desired but has no current owner, please add the 'Status: needs champion' label.

  4. added
    Status: stale-warningIssues and PRs flagged as stale which are due to be closed if no indication otherwise
    on Jul 3, 2026
  5. added
    Status: needs championHigh impact issues which aren't being worked on but require a volunteer to move the task forward.
    and removed
    Status: stale-warningIssues and PRs flagged as stale which are due to be closed if no indication otherwise
    on Jul 3, 2026
  6. added 2 commits that reference this issue on Sep 9, 2026
  7. added this to the 26.0.0 milestone on Sep 9, 2026
  8. AlenkaF commented on Sep 9, 2026

    @AlenkaF
    Member

    Issue resolved by pull request 46976
    #46976

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions