From 37c42ad1d9291048cd8d5db560dbf20cd6df0239 Mon Sep 17 00:00:00 2001 From: Joshua Klein Date: Wed, 3 Mar 2021 14:50:57 -0500 Subject: [PATCH] Docs: Update read_hdf's acceptable path types The docstring for `read_hdf` claims it can read from URLs and file-like objects. Neither of these are supported by the underlying `PyTables` library. --- pandas/io/pytables.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index 88b444acfea62..25cabbb7c61b9 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -348,19 +348,15 @@ def read_hdf( Parameters ---------- - path_or_buf : str, path object, pandas.HDFStore 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.h5``. + path_or_buf : str, path object, pandas.HDFStore + Any valid string path is acceptable. Only supports the local file system, + remote URLs and file-like objects are not supported. If you want to pass in a path object, pandas accepts any ``os.PathLike``. Alternatively, pandas accepts an open :class:`pandas.HDFStore` object. - By file-like object, we refer to objects with a ``read()`` method, - such as a file handle (e.g. via builtin ``open`` function) - or ``StringIO``. key : object, optional The group identifier in the store. Can be omitted if the HDF file contains a single pandas object.