Chapter 10Reading and Writing Files
Data is often stored in plain-text files, which can be organized in several different ways. The most straightforward data organization is one piece of data per line; for example, the rainfall amount in Oregon for each separate day in a study period might be stored on a line of its own. Alternatively, each line might store the values for an entire week or month, with a delimiter such as a space, tab, or comma used to separate values to make the data easier for humans to read.
Often, data organization is more complex. For example, a study might keep track of the heights, weights, and ages of the participants. Each record can appear on a line by itself, with the pieces of data in each record separated by delimiters. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access