Skip to content

Commit 45a1517

Browse files
committed
DOC: Reword doc for filepath_or_buffer in read_csv
Shortens dtype description following colon and moves it to a more expanded parameter description. Closes gh-22057.
1 parent 2c7c797 commit 45a1517

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

pandas/io/parsers.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,18 @@
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 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 the following:
69+
70+
* pathlib.Path
71+
* py._path.local.LocalPath
72+
73+
By file object, we refer to any object with a ``read()`` method, such as
74+
a file handler (e.g. via builtin ``open`` function) or ``StringIO``.
6875
%s
6976
delim_whitespace : boolean, default False
7077
Specifies whether or not whitespace (e.g. ``' '`` or ``'\t'``) will be

0 commit comments

Comments
 (0)