-
Notifications
You must be signed in to change notification settings - Fork 140
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
Introduce recorddelim
to CSV.write
#376
Conversation
Users can specify the delimeter for terminating records as a new keyword argument `recorddelim`. The default remains `'\n'`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather call the keyword argument newline
if you're alright w/ that. Could you add a test and docs as well?
@@ -154,6 +155,7 @@ end | |||
# handle unknown schema case | |||
function write(::Nothing, rows, file::Union{String, IO}; | |||
delim::Union{Char, String}=',', | |||
recorddelim::Union{Char, String}='\n', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather just call this newline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to oblige... but technically the record seperator doesn't have to be a line seperator at all.
For example, our literal matrices might have field delimiter ' '
and record delimiter ';'
and no newlines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe newrow
?
A bit off-topic, but it would be nice to accept both |
* Add `decimal` keyword argument to support custom float printing (fixes #385) * Add additional validation of quote/escape character arguments (fixes #369) * Add `quotestrings` keyword argument to support forcing all strings to be quoted (fixes #362) * Add `newline` keyword argument to support a custom row separator (fixes #375, supersedes #376)
Implemented in #406 |
* CSV.write enhancements * Add `decimal` keyword argument to support custom float printing (fixes #385) * Add additional validation of quote/escape character arguments (fixes #369) * Add `quotestrings` keyword argument to support forcing all strings to be quoted (fixes #362) * Add `newline` keyword argument to support a custom row separator (fixes #375, supersedes #376) * Fix grisu use in 1.0
Users can specify the delimeter for terminating records as a new keyword argument
recorddelim
. The default remains'\n'
.Resolves #375.
If the approach seems reasonable I can add tests and docs.