@@ -612,8 +612,7 @@ def parser_f(
612
612
if delim_whitespace and delimiter != default_sep :
613
613
raise ValueError (
614
614
"Specified a delimiter with both sep and "
615
- "delim_whitespace=True; you can only "
616
- "specify one."
615
+ "delim_whitespace=True; you can only specify one."
617
616
)
618
617
619
618
if engine is not None :
@@ -968,8 +967,7 @@ def _clean_options(self, options, engine):
968
967
fallback_reason = (
969
968
"the 'c' engine does not support "
970
969
"regex separators (separators > 1 char and "
971
- r"different from '\s+' are "
972
- "interpreted as regex)"
970
+ r"different from '\s+' are interpreted as regex)"
973
971
)
974
972
engine = "python"
975
973
elif delim_whitespace :
@@ -1000,8 +998,7 @@ def _clean_options(self, options, engine):
1000
998
fallback_reason = (
1001
999
"ord(quotechar) > 127, meaning the "
1002
1000
"quotechar is larger than one byte, "
1003
- "and the 'c' engine does not support "
1004
- "such quotechars"
1001
+ "and the 'c' engine does not support such quotechars"
1005
1002
)
1006
1003
engine = "python"
1007
1004
@@ -1119,9 +1116,8 @@ def _make_engine(self, engine="c"):
1119
1116
klass = FixedWidthFieldParser
1120
1117
else :
1121
1118
raise ValueError (
1122
- f"Unknown engine: { engine } (valid options are "
1123
- '"c", "python", or '
1124
- '"python-fwf")'
1119
+ f"Unknown engine: { engine } (valid options "
1120
+ 'are "c", "python", or "python-fwf")'
1125
1121
)
1126
1122
self ._engine = klass (self .f , ** self .options )
1127
1123
@@ -1230,8 +1226,7 @@ def _validate_usecols_names(usecols, names):
1230
1226
missing = [c for c in usecols if c not in names ]
1231
1227
if len (missing ) > 0 :
1232
1228
raise ValueError (
1233
- "Usecols do not match columns, "
1234
- f"columns expected but not found: { missing } "
1229
+ f"Usecols do not match columns, columns expected but not found: { missing } "
1235
1230
)
1236
1231
1237
1232
return usecols
@@ -1325,8 +1320,7 @@ def _validate_parse_dates_arg(parse_dates):
1325
1320
that is the case.
1326
1321
"""
1327
1322
msg = (
1328
- "Only booleans, lists, and "
1329
- "dictionaries are accepted "
1323
+ "Only booleans, lists, and dictionaries are accepted "
1330
1324
"for the 'parse_dates' parameter"
1331
1325
)
1332
1326
@@ -1680,8 +1674,7 @@ def _convert_to_ndarrays(
1680
1674
warnings .warn (
1681
1675
(
1682
1676
"Both a converter and dtype were specified "
1683
- f"for column { c } - only the converter will "
1684
- "be used"
1677
+ f"for column { c } - only the converter will be used"
1685
1678
),
1686
1679
ParserWarning ,
1687
1680
stacklevel = 7 ,
@@ -1826,8 +1819,7 @@ def _cast_types(self, values, cast_type, column):
1826
1819
except NotImplementedError :
1827
1820
raise NotImplementedError (
1828
1821
f"Extension Array: { array_type } must implement "
1829
- "_from_sequence_of_strings in order "
1830
- "to be used in parser methods"
1822
+ "_from_sequence_of_strings in order to be used in parser methods"
1831
1823
)
1832
1824
1833
1825
else :
0 commit comments