Skip to content

Commit bffda55

Browse files
committed
Fix read_fwf missing parameters in docstring
1 parent 3a0a82a commit bffda55

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

pandas/io/parsers.py

+17-1
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,22 @@
343343
Alias for sep.
344344
"""
345345

346+
_fwf_widths = r"""
347+
colspecs : list of pairs (int, int) or 'infer'. optional
348+
A list of pairs (tuples) giving the extents of the fixed-width
349+
fields of each line as half-open intervals (i.e., [from, to[ ).
350+
String value 'infer' can be used to instruct the parser to try
351+
detecting the column specifications from the first 100 rows of
352+
the data which are not being skipped via skiprows (default='infer').
353+
widths : list of ints. optional
354+
A list of field widths which can be used instead of 'colspecs' if
355+
the intervals are contiguous.
356+
delimiter : str, default ``'\t' + ' '``
357+
Characters to consider as filler characters in the fixed-width file.
358+
Can be used to specify the filler character of the fields
359+
if it is not spaces (e.g., '~').
360+
"""
361+
346362

347363
def _validate_integer(name, val, min_val=0):
348364
"""
@@ -712,7 +728,7 @@ def parser_f(filepath_or_buffer,
712728
func_name='read_fwf',
713729
summary=('Read a table of fixed-width formatted lines '
714730
'into DataFrame.'),
715-
sep_doc='',
731+
sep_doc=_fwf_widths,
716732
engine_doc=''))
717733
def read_fwf(filepath_or_buffer, colspecs='infer', widths=None, **kwds):
718734
# Check input arguments.

0 commit comments

Comments
 (0)