@@ -1231,6 +1231,7 @@ def read_fwf(
1231
1231
* ,
1232
1232
colspecs : Sequence [tuple [int , int ]] | str | None = "infer" ,
1233
1233
widths : Sequence [int ] | None = None ,
1234
+ delimiter : str | None = " \t " ,
1234
1235
infer_nrows : int = 100 ,
1235
1236
** kwds ,
1236
1237
) -> DataFrame | TextFileReader :
@@ -1251,7 +1252,7 @@ def read_fwf(
1251
1252
Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is
1252
1253
expected. A local file could be:
1253
1254
``file://localhost/path/to/table.csv``.
1254
- colspecs : list of tuple (int, int) or 'infer'. optional
1255
+ colspecs : list of tuple (int, int) or 'infer', optional
1255
1256
A list of tuples giving the extents of the fixed-width
1256
1257
fields of each line as half-open intervals (i.e., [from, to[ ).
1257
1258
String value 'infer' can be used to instruct the parser to try
@@ -1260,6 +1261,9 @@ def read_fwf(
1260
1261
widths : list of int, optional
1261
1262
A list of field widths which can be used instead of 'colspecs' if
1262
1263
the intervals are contiguous.
1264
+ delimiter : str, default " \t" (space and tab), optional
1265
+ Character(s) to strip from start and end of each field. To
1266
+ preserve whitespace, must be non-default value (i.e. delimiter="\0").
1263
1267
infer_nrows : int, default 100
1264
1268
The number of rows to consider when letting the parser determine the
1265
1269
`colspecs`.
0 commit comments