flâneur — a map of the web's best reading

CSC 151 - Reading data from files

eikmeier.sites.grinnell.edu · 2,531 words · saved by 1 readers

In our recent exploration of tables we found that it is possible to work with tables of data when they are represented as lists of lists. And that makes sense if we’re working in Scheme. However, people work with data in many languages, so we should not store it in Scheme format. Fortunately, there are a variety of formats that computer scientists use to store data. We will explore a few such formats and the procedures we use to work with data in those formats. The most common file format for tables of data are comma-separated value files, most typically referred to by the initials “CSV” or “csv”. Each line of a csv file contains one row of a table, with the entries separated by commas (hence the name). In general, the assumption in csv files is that something that looks like a number is a number and everything else is a string. For example, here is an entry in our “state capitals” file for Des Moines. At first glance, the basic rules seem simple and straightforward: (1) values are sep

CSC 151 - Reading data from files Reading data from files Due Friday, 3 October 2025 --> Summary We begin our consideration of ways to store data in files and how to work with data once they are stored in files. Along the way, we consider some of the complexities of representing data. Introduction: Storing data In our recent exploration of tables we found that it is possible to work with tables of data when they are represented as lists of lists. And that makes sense if we’re working in Scheme. However, people work with data in many languages, so we should not store it in Scheme format. Fortun

Explore this link on the map →

saved by

related reading