This chapter was a basic overview of the steps involved in programmatically processing data files. To recap, I first introduced file I/O and demonstrated how the Python programming language interacts with the computer's filesystem. Then, I showed how a Python file
object is used with the json
module to read and parse a JSON files. Following this, I walked through a basic demonstration to show how you might go about exploring the contents of a data file. Once all of this was covered, I showed how to conduct some basic data modification steps. Finally, I showed how to write data to an output file.
A particular emphasis in this chapter was placed on the process of opening, parsing data and writing the result to the output. Using some frameworks like R
and Pandas
opening reading and writing files is more straight forward. Future chapters will focus more on the exploration and modification steps and much less on the specifics of inputting and outputting data. Understanding how to interact...