Introduction
Automate file tasks with Python
()
1. Accessing Directory and File Details
Understand the file system
()
Navigate the file system with os module
()
Use os module to uncover path and file details
()
Filter path names with glob module
()
Recursively list all files in a directory
()
Understand Python's new pathlib module
()
Create directories in Python
()
Challenge: Count files
()
Solution: Count files
()
2. Processing Files
Open files in Python
()
Read text files in Python
()
Parse JSON files with Python
()
Read CSV files in Python with csv module and pandas
()
Extract text from PDF files using Python
()
Challenge: Aggregate data from multiple sources
()
Solution: Aggregate data from multiple sources
()
3. Writing to Files
Write data to a file in Python
()
Move and rename files with Python
()
Copy with Python
()
Delete files with Python
()
Save tabular data with csv module
()
Write data to a JSON file in Python
()
Challenge: Reorganize digital photo collection
()
Solution: Reorganize digital photo collection
()
4. Working with Archives and Temporary Files
Create ZIP archives with Python
()
Read from and extract ZIP archives
()
Open and read TAR archives
()
Extract from and write to TAR archives
()
Work with temporary files in Python
()
Conclusion
Continue to analyze data with Python
()
Ex_Files_Python_Working_with_Files.zip
(92.3 MB)