From 92cc5786d78b6ddd861212413742923a4c172c85 Mon Sep 17 00:00:00 2001 From: gfyoung Date: Wed, 25 Jul 2018 16:14:48 -0700 Subject: [PATCH] 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. --- pandas/io/parsers.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pandas/io/parsers.py b/pandas/io/parsers.py index 486040fa52f35..2ae7622c13548 100755 --- a/pandas/io/parsers.py +++ b/pandas/io/parsers.py @@ -60,11 +60,16 @@ Parameters ---------- -filepath_or_buffer : str, pathlib.Path, py._path.local.LocalPath or any \ -object with a read() method (such as a file handle or StringIO) - The string could be a URL. Valid URL schemes include http, ftp, s3, and - file. For file URLs, a host is expected. For instance, a local file could - be file://localhost/path/to/table.csv +filepath_or_buffer : str, path object, or file-like object + Any valid string path is acceptable. The string could be a URL. Valid + URL schemes include http, ftp, s3, and file. For file URLs, a host is + expected. A local file could be: file://localhost/path/to/table.csv. + + If you want to pass in a path object, pandas accepts either + ``pathlib.Path`` or ``py._path.local.LocalPath``. + + By file-like object, we refer to objects with a ``read()`` method, such as + a file handler (e.g. via builtin ``open`` function) or ``StringIO``. %s delim_whitespace : boolean, default False Specifies whether or not whitespace (e.g. ``' '`` or ``'\t'``) will be