-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Add trailing trailing newline in to_json #36898
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
Conversation
…_lines` method. Also reformatted and merged the code with latest master branch
can you add a test for this |
@jbrockmendel Yes. Will do that |
…ed master changes into current branch
@jbrockmendel added a test for the bug. And also fixed the breaking tests. |
cc @WillAyd |
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.
seems reasonable - @jreback
Can anyone of you complete the PR. @jbrockmendel @WillAyd . There will be again a lot of conflicts if delayed 👍 |
thanks @Rohith295 |
We recently upgraded from Pandas 1.1.5 to Pandas 1.4.3. In Pandas 1.2, a bug was fixed that prevented trailing whitespaces from being added to the end of dumped ndjson output. See [here](pandas-dev/pandas#36898) for additional information. This change uses `rstrip` on the dumped ndjson output so that all trailing whitespace is removed before this data is dumped to stdout (or a destination file). Note that this trailing newline affected our assumptions about the structure of NDJSON files and thus prevented files created after the upgrade from being parsed without error.
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff