-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
BUG: provide chunks with progressively numbered (default) indices #12289
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -461,6 +461,18 @@ def test_get_chunk_passed_chunksize(self): | |
| piece = result.get_chunk() | ||
| self.assertEqual(len(piece), 2) | ||
|
|
||
| def test_read_chunksize_generated_index(self): | ||
| # GH 12185 | ||
| reader = self.read_csv(StringIO(self.data1), chunksize=2) | ||
| df = self.read_csv(StringIO(self.data1)) | ||
|
||
|
|
||
| tm.assert_frame_equal(pd.concat(reader), df) | ||
|
|
||
| reader = self.read_csv(StringIO(self.data1), chunksize=2, index_col=0) | ||
| df = self.read_csv(StringIO(self.data1), index_col=0) | ||
|
|
||
| tm.assert_frame_equal(pd.concat(reader), df) | ||
|
|
||
| def test_read_text_list(self): | ||
| data = """A,B,C\nfoo,1,2,3\nbar,4,5,6""" | ||
| as_list = [['A', 'B', 'C'], ['foo', '1', '2', '3'], ['bar', | ||
|
|
||
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.
hmm is this already done for the python parser? (e.g. the progressive numbering for chunks)?
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.
Do you mean the fix or the test? Anywhere, both the fix and the test apply to both parsers.
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 meant both.