Storing and Accessing Data in Lists
Table 8, Gray Whale Census, shows the number of gray whales counted near the Coal Oil Point Natural Reserve in a two-week period starting on February 24, 2008.[4]
|
Day |
Number of Whales |
Day |
Number of Whales |
|---|---|---|---|
|
1 |
5 |
8 |
6 |
|
2 |
4 |
9 |
4 |
|
3 |
7 |
10 |
2 |
|
4 |
3 |
11 |
1 |
|
5 |
2 |
12 |
7 |
|
6 |
3 |
13 |
1 |
|
7 |
2 |
14 |
3 |
Using what we have seen so far, we would have to create fourteen variables to keep track of the number of whales counted each day:

To track an entire year’s worth of observations, we would need 365 variables (366 for a leap ...
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