-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Clarify whitespace behavior in read_fwf documentation (#16772) #16950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,8 +63,6 @@ | |
file. For file URLs, a host is expected. For instance, a local file could | ||
be file ://localhost/path/to/table.csv | ||
%s | ||
delimiter : str, default ``None`` | ||
Alternative argument name for sep. | ||
delim_whitespace : boolean, default False | ||
Specifies whether or not whitespace (e.g. ``' '`` or ``'\t'``) will be | ||
used as the sep. Equivalent to setting ``sep='\s+'``. If this option | ||
|
@@ -316,7 +314,9 @@ | |
be used automatically. In addition, separators longer than 1 character and | ||
different from ``'\s+'`` will be interpreted as regular expressions and | ||
will also force the use of the Python parsing engine. Note that regex | ||
delimiters are prone to ignoring quoted data. Regex example: ``'\r\t'``""" | ||
delimiters are prone to ignoring quoted data. Regex example: ``'\r\t'`` | ||
delimiter : str, default ``None`` | ||
Alternative argument name for sep.""" | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was this moved in the first place? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure why this was originally moved out of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Awesome. Thanks! |
||
_read_csv_doc = """ | ||
Read CSV (comma-separated) file into DataFrame | ||
|
@@ -341,15 +341,16 @@ | |
widths : list of ints. optional | ||
A list of field widths which can be used instead of 'colspecs' if | ||
the intervals are contiguous. | ||
delimiter : str, default ``'\t' + ' '`` | ||
Characters to consider as filler characters in the fixed-width file. | ||
Can be used to specify the filler character of the fields | ||
if it is not spaces (e.g., '~'). | ||
""" | ||
|
||
_read_fwf_doc = """ | ||
Read a table of fixed-width formatted lines into DataFrame | ||
|
||
%s | ||
|
||
Also, 'delimiter' is used to specify the filler character of the | ||
fields if it is not spaces (e.g., '~'). | ||
""" % (_parser_params % (_fwf_widths, '')) | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you may need to update
docs/source/io.rst
as wellThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done now.