dbutils.fs.ls versus pathlib.Path
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 09:25 AM
Hello community members,
The dbutils.fs.ls('/') exposes the distributed file system(DBFS) on the databricks cluster. Similary, the python library pathlib can also expose 4 files in the cluster like below:
from pathlib import Path
mypath = Path('/')
for item, num in mypath.iterdir():
print(num, item)
How do they differ and what kind of files do they allow to work with ?
Thanks