Skip to content

Commit dfd58e8

Browse files
gfyoungjorisvandenbossche
authored andcommitted
DOC: Reword doc for filepath_or_buffer in read_csv (pandas-dev#22058)
Shortens dtype description following colon and moves it to a more expanded parameter description. Closes pandas-devgh-22057.
1 parent 7a2fbce commit dfd58e8

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

pandas/io/parsers.py

+10-5
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,16 @@
6060
6161
Parameters
6262
----------
63-
filepath_or_buffer : str, pathlib.Path, py._path.local.LocalPath or any \
64-
object with a read() method (such as a file handle or StringIO)
65-
The string could be a URL. Valid URL schemes include http, ftp, s3, and
66-
file. For file URLs, a host is expected. For instance, a local file could
67-
be file://localhost/path/to/table.csv
63+
filepath_or_buffer : str, path object, or file-like object
64+
Any valid string path is acceptable. The string could be a URL. Valid
65+
URL schemes include http, ftp, s3, and file. For file URLs, a host is
66+
expected. A local file could be: file://localhost/path/to/table.csv.
67+
68+
If you want to pass in a path object, pandas accepts either
69+
``pathlib.Path`` or ``py._path.local.LocalPath``.
70+
71+
By file-like object, we refer to objects with a ``read()`` method, such as
72+
a file handler (e.g. via builtin ``open`` function) or ``StringIO``.
6873
%s
6974
delim_whitespace : boolean, default False
7075
Specifies whether or not whitespace (e.g. ``' '`` or ``'\t'``) will be

0 commit comments

Comments
 (0)