-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
#59009: Added document and a test case for newlines_in_values case. #59754
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
pandas/io/parsers/readers.py
Outdated
>>> from pyarrow import csv | ||
>>> parse_options = csv.ParseOptions(newlines_in_values=True) | ||
>>> table = csv.read_csv("example.csv", parse_options=parse_options) |
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.
>>> from pyarrow import csv | |
>>> parse_options = csv.ParseOptions(newlines_in_values=True) | |
>>> table = csv.read_csv("example.csv", parse_options=parse_options) | |
>>> import io | |
>>> from pyarrow import csv | |
>>> rows = [{"text": "ab\ncd", "idx": idx} for idx in range(1_000_000)] | |
>>> df = pd.DataFrame(rows) | |
>>> source = io.BytesIO(df.to_string(index=False).encode()) | |
>>> parse_options = csv.ParseOptions(newlines_in_values=True) | |
>>> table = csv.read_csv(source, parse_options=parse_options) |
The doctest will fail because "example.csv" does not exist. We can change a bit or just skip the test.
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.
Instead of changing the example codes, I tried to skip the doctest because most of use cases with pyarrow are probably using csv files.
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 am pretty new to numpy contribution. If the example codes need to be modified as suggested, please let me know.
…ue_#59009 fixed errors from PR.
Hi @wooseogchoi thanks for taking a look at this. Regarding the CI failures - the If you can identify that you can use the The errors on the circleci arm build seem unrelated - they may go away if you merge in the latest changes from main |
This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this. |
Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen. |
pyarrow
when values contain newline character. #59009 (Replace xxxx with the GitHub issue number)doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.