Skip to content

Commit c6ccdf3

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 57698c2 commit c6ccdf3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pandas/io/parsers/base_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ def _check_data_length(
614614
columns: list of column names
615615
data: list of array-likes containing the data column-wise.
616616
"""
617-
if columns and len(data)!=len(columns):
617+
if columns and len(data) != len(columns):
618618
warnings.warn(
619619
f"Length of header or names ({len(columns)}) does not match number of "
620620
f"fields in line ({len(data)}). Extra field will be dropped.",

pandas/tests/io/parser/test_python_parser_only.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,9 @@ def line_fixer(_line):
334334
return ["1", "2", "3", "4", "5"]
335335

336336
expected_warning = (
337-
r"Length of header or names \(3\) does not match number of fields in line \(5\)\. "
338-
r"Extra field will be dropped\."
339-
)
337+
r"Length of header or names \(3\) does not match number of fields in line \(5\)\. "
338+
r"Extra field will be dropped\."
339+
)
340340

341341
for index_col in [None, 0]:
342342
with tm.assert_produces_warning(ParserWarning, match=expected_warning):

0 commit comments

Comments
 (0)