April 2024
Beginner to intermediate
500 pages
24h 20m
English
In the next few sections, we perform simple statistics on data sets stored in list structures. For example, let’s assume that we want to analyze statistics on earthquakes worldwide. During one seven-day period, we find that there were 37 earthquakes on Monday, 32 on Tuesday, 46 on Wednesday, 28 on Thursday, 37 on Friday, 41 on Saturday, and 31 on Sunday. This data can be stored in the simple list:
[37, 32, 46, 28, 37, 41, 31]
Python’s statistics module can help with our analysis of the data. Table 4.5 highlights some useful functions from this module. To use these functions, we need to import the statistics module. In addition, we can get help from some built-in Python functions, as shown in Table 4.6. All ...
Read now
Unlock full access