We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1dd4080 commit 1c3f6faCopy full SHA for 1c3f6fa
pandas/io/common.py
@@ -1375,7 +1375,13 @@ def iterdir(
1375
ImportError
1376
If fsspec is required but not installed.
1377
"""
1378
- if hasattr(path, "read") or hasattr(path, "write"):
+
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
+ ):
1385
return path
1386
1387
if not isinstance(path, (str, os.PathLike)):
0 commit comments