-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Avoid dubble newlines in csv output #366
Conversation
We use the default configuration of Now changing that would probably break compatibility with quite a few integrations. I think we should keep the default as it looks sane (it's the default of most applications generating CSV as far as I can tell), and trimming the CRLF can be done with Unix tools. |
Thanks for the comment @k4nar. I believe Excel is compatible with |
3502711
to
1b3a59f
Compare
I made a suggestion for a configurable |
I have mixed feelings about this... I think most UNIX users are able to use |
Yes it is true that it is possible to use those tools. I personally think it would be more convenient to have it as an option in the configuration. Do you think there is a drawback with adding it, like not cluttering the config file with too many possible options? |
Yup. |
Makes sense, what do you think about setting the lineterminator to
|
Good idea! I wonder why this is not the default for the |
Ok for me 👍 . |
1b3a59f
to
e872fb2
Compare
Great! I added this change and removed the previous ones. |
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.
Hi @joelostblom, I believe you should also change a couple tests in test_utils.py
.
Thanks @davidag, I updated the two tests that used a lineterminator variable explicitly and added a note in the changelog. |
Hey @joelostblom can you rebase your branch so that I can merge this. Thanks! |
@jmaupetit Rebased! |
🤔 I guess a new arrow release is breaking the build... again. 😞 |
Yes, i submitted another PR to pin the arrow version #372 |
Yup saw it, merged it! Ready for another rebase? |
Done! |
Inspired by @joelostblom in jazzband/Watson#366 which himself got inspired in Pandas CSV output default behavior. pandas-dev/pandas@31f86d6
I noticed that an extra newline character is added to each line of the
--csv
outputs(displayed as
^M
in vim):This is not needed and can cause some programs to accidentally read in a blank line between each line in the csv output:
This PR is a suggestion for how to fix this and change the output of
--csv
toI have only tested this in vim and gedit on Linux.