daft.from_glob_path#
- daft.from_glob_path(path: str, io_config: Optional[IOConfig] = None) DataFrame [source]#
Creates a DataFrame of file paths and other metadata from a glob path.
This method supports wildcards:
“*” matches any number of any characters including none
“?” matches any single character
“[…]” matches any single character in the brackets
“**” recursively matches any number of layers of directories
The returned DataFrame will have the following columns:
path: the path to the file/directory
size: size of the object in bytes
type: either “file” or “directory”
Example
>>> df = daft.from_glob_path("/path/to/files/*.jpeg") >>> df = daft.from_glob_path("/path/to/files/**/*.jpeg") >>> df = daft.from_glob_path("/path/to/files/**/image-?.jpeg")