Hello again! 👋
This issue is part of a Python series dedicated to sharing tips and best practices to improve your code.
If you’re interested in this type of content (+ the additional coding material)
consider subscribing.
As a data scientist, I manipulate paths and files on a daily basis to read and write data.
To do this, I typically use the os.path
Python module to perform operations such as joining paths, checking the content of a directory, or creating folders.
In this issue, I’m challenging this practice by introducing another path management library called Pathlib.
We’ll see how this library works, how it differs from the os.path module, what features and benefits it provides, and when you should (or not) use it.
If you’re a Python developer, learning about Pathlib will make your code lighter, more flexible, and easier to write and maintain.
Let’s dig in.
Keep reading with a 7-day free trial
Subscribe to The Tech Buffet to keep reading this post and get 7 days of free access to the full post archives.