Skip to content

Commit 7fdbf43

Browse files
committed
fixed unit-test failure.
1 parent 898365e commit 7fdbf43

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pandas/io/parsers/readers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,11 +555,12 @@ class _read_shared(TypedDict, Generic[HashableT], total=False):
555555
col 3 datetime64[ns]
556556
dtype: object
557557
558-
The csv in pyarrow must be used if values have new line character.
558+
The csv in the pyarrow must be used if the values in the file have
559+
new line characters.
559560
560561
>>> from pyarrow import csv
561562
>>> parse_options = csv.ParseOptions(newlines_in_values=True)
562-
>>> table = csv.read_csv("./example.csv", parse_options=parse_options)
563+
>>> table = csv.read_csv("example.csv", parse_options=parse_options)
563564
>>> df = table.to_pandas()
564565
>>> df.head()
565566
text idx

pandas/tests/io/parser/test_unsupported.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ def test_pyarrow_engine(self):
152152
read_csv(StringIO(data), engine="pyarrow", **kwargs)
153153

154154
def test_pyarrow_newlines_in_values(self):
155+
pytest.importorskip("pyarrow")
155156
msg = (
156157
"CSV parser got out of sync with chunker. "
157158
"This can mean the data file contains cell values spanning multiple "

0 commit comments

Comments
 (0)