dogversioning opened a new issue, #42032:
URL: https://github.com/apache/arrow/issues/42032

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   I've been cutting over some 'I need to give this data to non-techincal users 
for review' csv file generation in python to pyarrow, using streaming to disk 
via `pyarrow.csv.CSVWriter`. I've noticed some discrepancies in the output 
format while passing in a `pyarrow.csv.WriteOptions` config to the writer. 
   
   With the default `csv.QUOTE_MINIMAL`, I would expect the following kind of 
output:
   ```
   a,b,c
   1,foo,"foo,bar"
   ```
   Instead, I am seeing data that looks like this for 
`pyarrow.csv.WriteOptions(quoting_style='needed')`:
   ```
   "a","b","c"
   1,"foo","foo,bar"
   ```
   Which is closer to `csv.QUOTE_NONNUMERIC`. (and, as mentioned in [this 
issue](https://github.com/apache/arrow/issues/41239), quotes headers, which is 
true even with `pyarrow.csv.WriteOptions(quoting_style='none')`.
   
   It would be nice to be able to have a 1:1 interface to csv writing that 
matched the outputs of the native csv writer's [output 
modes](https://docs.python.org/3.11/library/csv.html#csv.QUOTE_ALL) (noting 
that there's a few new ones in 3.12). Since `csv.QUOTE_MINIMAL` is the python 
csv writing default, it would be nice behavior for that to be the default here 
as well.
   
   ### Component(s)
   
   Python


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to