-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
Add chunksize param to read_json when lines=True #17168
Merged
Merged
Changes from all commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
4cd506e
Add chunksize param to read_json when lines=True
louispotok 9fe44f1
Add read_json chunksize change to whatsnew
louispotok 6de3a27
Add versionadded to docstring
louispotok e235c70
add docstring for _read_json_as_lines
louispotok 0a5a8f9
add basic read_json chunksize test
louispotok ce23444
validate read_json chunksize is an integer and >=1
louispotok a97ca0b
Add more tests to read_json chunksize
louispotok 2861d0e
Return JsonLineReader from read_json
louispotok da59b4a
Raise ValueError if chunksize is not None, but not lines
louispotok 4544f82
Add issue number to test docstring and add test.
louispotok dad7f11
bugfix: raise StopIteration, dont return it
louispotok bb8b1b6
PEP8 cleanup
louispotok 3e81bba
Bugfixes for chunksize
louispotok e049d29
add chunksize test for reading from file
louispotok 400d313
pep8 cleanup
louispotok b756c90
Run chunksize checks before file is opened
louispotok b71f65b
move strio df in test to fixture
louispotok d6e86af
Improve read_json chunking tests
louispotok 4d91280
bugfix in read_json tests, remove fixture
louispotok 2474429
JsonLineReader opens and closes filepaths
louispotok b18b3df
pep8 cleanup
louispotok 4c1d6a6
update whatsnew
louispotok d589b0b
update docs on read_json chunksize
louispotok eba45a2
Always use JsonReader in read_json
louispotok d0ea295
make lines_json_df a fixture
louispotok bb3182d
remove unneeded concats in tests
louispotok 8cc43ff
parametrize some tests
louispotok de03462
add __close__ method to JsonReader and use it
louispotok 07b31c7
remove import io in docs
louispotok 7d0642f
move read_json in whatsnew to Other Enhancements
louispotok 398961b
move chunksize and lines validation into JsonReader
louispotok dfa2967
remove extraneous else
louispotok b0e4bb0
remove unneccessary cast to list
louispotok e3197c5
move combine_lines call into read
louispotok 39f9881
remove another extraneous else
louispotok c2247c3
always close JsonReader
louispotok 46d8a68
add test that read_json closes file correctly
louispotok 066e26d
minor formatting fixups
louispotok 08e8b6c
remove extraneous else
louispotok 1ac6953
add benchmarks for read_json
louispotok 0782df9
update benchmarks
louispotok 014d493
move json_lines tests to io_bench
louispotok a913d8e
add peakmem for jsonlines
louispotok ce7aef6
smaller benchmark
louispotok 1dc1526
refactor JsonReader
louispotok 03b6069
add test for reading with multiple empty lines
louispotok aef6bbc
add support for JSON docs with multiple consecutive newlines
louispotok 30e4043
remove raw_json init param
louispotok 7dae78a
DRY for combining lines
louispotok fe95445
use floor division in asv bench
louispotok e41124a
add teardown to asv bench
louispotok 9cfd012
add docs
louispotok 035ca84
pep fixup
louispotok 4c92287
update documentation
louispotok 61178be
simplify JsonReader._preprocess_data
louispotok a284187
simplify _get_data_from_filepath
louispotok 55170dd
Update read_json tests
louispotok 1d7087d
JsonReader should only close if it opened
louispotok 6a76c55
split out json readlines to sep test class
louispotok a72411f
add encoding to test_readlines
louispotok 5612934
pep8 cleanup
louispotok 28d1cbe
minor fixups
louispotok File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
you could move _preprocess_data back to
__init__
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 prefer it split out, I think it keeps things easier to read. But I can move it back if you like.