IN THIS CHAPTER
Defining why data requires structure
Working with stacks, queues, lists, and dictionaries
Using trees to organize data
Using graphs to represent data with relations
Raw data is just that: raw. It’s not structured or cleaned in any way. You might find some parts of it missing or damaged in some way, or simply that it won’t work for your problem. In fact, you’re not entirely sure just what you’re getting because it’s raw.
Before you can do anything with most data, you must structure it in some manner so that you can begin to see what the data contains (and, sometimes, what it doesn’t). Structuring data entails organizing it in some way so that all the data has the same attributes, appearance, and components. For example, you might get data from one source that contains dates in string form and another source that uses date objects. To use the information, you must make the kinds of data match. Data sources might also structure the data differently. One source might have the last and first name in a single field; another source might use individual ...