Advanced Python Topics: File Operations in Python

Python 3+
  • 11 Videos | 1h 16m 8s
  • Includes Assessment
  • Earns a Badge
Likes 77 Likes 77
Python includes functions and modules that simplify working with files. In this 11-video course, explore operations for standard text files and handling of formatted data such as JSON and CSV by using Python modules designed for such data. Learners begin with a look at some of the file operations in Python. Use Python's open function to open a file for reading, and differentiate between the read(), readline(), and readlines() functions. View differences between opening a file in write mode and append mode in Python. This leads on to distinguishing between the r+ and a+ modes to read from and write to a file; using load and loads functions of the json module to parse JSON data, and converting Python dictionaries and lists into JSON strings and files. Next, learn how to identify file formats that can be handled by the CSV module in Python, and convert Python dictionaries and lists into CSV files. The final tutorial concerns defining a customized file format, creating a CSV dialect, and using that to parse and write data.

WHAT YOU WILL LEARN

  • discover the key concepts covered in this course
    use the open function in Python to open a file for reading
    recognize the differences between the read(), readline(), and readlines() functions when working with files in Python
    recall the differences between opening a file in write mode and append mode
    distinguish between the r+ and a+ modes to read from and write to a file
    use the load and loads functions of the json module to parse JSON data
  • convert Python dictionaries and lists into JSON strings and files
    identify some of the file formats that can be handled by the CSV module in Python
    convert Python dictionaries and lists into CSV files
    define a customized file format creating a CSV dialect and use that to parse and write data
    summarize the key concepts covered in this course

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    2m 13s
    UP NEXT
  • Playable
    2. 
    Opening a File in Python
    8m 40s
  • Locked
    3. 
    The Different Read Functions
    7m 44s
  • Locked
    4. 
    Writing to Files in Python
    8m 30s
  • Locked
    5. 
    The r+ and a+ Modes
    7m 13s
  • Locked
    6. 
    Reading JSON Data in Python
    7m 40s
  • Locked
    7. 
    Transforming Python Objects into JSON
    6m 27s
  • Locked
    8. 
    Parsing Different Forms of CSV files
    8m 16s
  • Locked
    9. 
    Transforming Python Objects into CSV
    8m 46s
  • Locked
    10. 
    CSV Dialects
    4m 37s
  • Locked
    11. 
    Course Summary
    1m 31s

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion of this course, which can be shared on any social network or business platform

Digital badges are yours to keep, forever.

YOU MIGHT ALSO LIKE

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE