Skip to content

Commit 1c3f6fa

Browse files
committed
url passthrough
1 parent 1dd4080 commit 1c3f6fa

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pandas/io/common.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,13 @@ def iterdir(
13751375
ImportError
13761376
If fsspec is required but not installed.
13771377
"""
1378-
if hasattr(path, "read") or hasattr(path, "write"):
1378+
1379+
# file-like objects and urls are returned directly
1380+
if (
1381+
hasattr(path, "read")
1382+
or hasattr(path, "write")
1383+
or (isinstance(path, str) and is_url(path))
1384+
):
13791385
return path
13801386

13811387
if not isinstance(path, (str, os.PathLike)):

0 commit comments

Comments
 (0)