CSC 151 - Reading data from files
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
- CSC 151 - List basicseikmeier.sites.grinnell.edu
- CSC 151 - Coding Challenge 5eikmeier.sites.grinnell.edu
- CSC 151 - Coding Challenge 4eikmeier.sites.grinnell.edu
- CSC 151 - Code Formatting and Styleeikmeier.sites.grinnell.edu
- CSC 151 - Coding Challenge 8eikmeier.sites.grinnell.edu
- CSC 151 - Transforming listseikmeier.sites.grinnell.edu
- CSC 151 - Coding Challenge 1eikmeier.sites.grinnell.edu
- CSC 151 - Naming values with local bindingseikmeier.sites.grinnell.edu
- CSC 151 - The "big three" list operationseikmeier.sites.grinnell.edu
- CSC 151 - Coding Challenge 6eikmeier.sites.grinnell.edu
- CSC 151 - Anonymous procedureseikmeier.sites.grinnell.edu
- Assignment 3: Merging Spreadsheets (CS 2110 Fall 2024)courses.cis.cornell.edu