Skip to content

Commit 1afe0e2

Browse files
committed
improve docs
1 parent 0ffeaf2 commit 1afe0e2

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

pandas/io/common.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@ def iterdir(
13661366
storage_options: StorageOptions | None = None,
13671367
) -> FilePath | list[FilePath] | ReadCsvBuffer[bytes] | ReadCsvBuffer[str]:
13681368
"""
1369-
Yield file paths in a directory (no nesting allowed). File-like objects
1369+
Return file paths in a directory (no nesting allowed). File-like objects
13701370
and string URLs are returned directly. Remote paths are handled via fsspec.
13711371
13721372
Supports:
@@ -1379,17 +1379,17 @@ def iterdir(
13791379
path : FilePath
13801380
Path to the directory (local or remote).
13811381
extensions : str or list of str, optional
1382-
Only yield files with the given extension(s). Case-insensitive.
1383-
If None, all files are yielded.
1382+
Only return files with the given extension(s). Case-insensitive.
1383+
If None, all files are returned.
13841384
glob : str, optional
1385-
Only yield files matching the given glob pattern.
1386-
If None, all files are yielded.
1385+
Only return files matching the given glob pattern.
1386+
If None, all files are returned.
13871387
13881388
Returns
1389-
------
1390-
list of str or Path, BaseBuffer
1389+
-------
1390+
FilePath or list[FilePath] or ReadCsvBuffer
13911391
If `path` is a file-like object, returns it directly.
1392-
Otherwise, returns list of file paths in the directory.
1392+
Otherwise, returns a list of file paths in the directory.
13931393
13941394
Raises
13951395
------
@@ -1465,7 +1465,7 @@ def iterdir(
14651465
if fs.isfile(inner_path):
14661466
path_obj = PurePosixPath(inner_path)
14671467
if _match_file(
1468-
inner_path,
1468+
path_obj,
14691469
extensions,
14701470
glob,
14711471
):

pandas/io/parsers/readers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def _validate_names(names: Sequence[Hashable] | None) -> None:
258258

259259

260260
def _multi_file_generator(
261-
list_of_files: list[FilePath], kwds
261+
list_of_files: list[FilePath], kwds: dict[str, Any]
262262
) -> Generator[DataFrame] | Generator[TextFileReader]:
263263
"""
264264
Generator that yields DataFrames or TextFileReaders for each file in the

0 commit comments

Comments
 (0)