Skip to content

Commit ccd14a8

Browse files
committed
removed traied spaces and changed test codes.
1 parent 9ebb87b commit ccd14a8

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

pandas/io/parsers/readers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,9 @@ class _read_shared(TypedDict, Generic[HashableT], total=False):
248248
249249
The 'pyarrow' engine was added as an *experimental* engine, and some features
250250
are unsupported, or may not work correctly, with this engine. For example,
251-
the newlines_in_values in the ParseOptions of the pyarrow allows handling the
251+
the newlines_in_values in the ParseOptions of the pyarrow allows handling the
252252
newline characters within values when parsing csv files. However, this is not
253-
currently supported by Pandas. In this case, the 'csv' module in the pyarrow
253+
currently supported by Pandas. In this case, the 'csv' module in the pyarrow
254254
should be used instead. For more information, refer to the example.
255255
converters : dict of {{Hashable : Callable}}, optional
256256
Functions for converting values in specified columns. Keys can either

pandas/tests/io/parser/test_unsupported.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,11 @@ def test_pyarrow_engine(self):
153153

154154
def test_pyarrow_newlines_in_values(self):
155155
msg = (
156-
"CSV parser got out of sync with chunker. "
157-
"This can mean the data file contains cell values spanning multiple lines; "
158-
"please consider enabling the option 'newlines_in_values'."
156+
"CSV parser got out of sync with chunker. "
157+
"This can mean the data file contains cell values spanning multiple "
158+
"lines; please consider enabling the option 'newlines_in_values'."
159159
)
160-
rows = []
161-
for idx in range(1_000_000):
162-
rows.append({"text": "ab\ncd", "idx" : idx})
160+
rows = [{"text": "ab\ncd", "idx" : idx} for idx in range(1_000_000)]
163161
df = DataFrame(rows)
164162
df.to_csv("test.csv", index=False)
165163
with pytest.raises(ValueError, match=msg):

0 commit comments

Comments
 (0)