October 2019
Beginner to intermediate
498 pages
14h 13m
English
This chapter used external data sources as input into Python programs. Some of these data sources, called text files, can reside on a local machine or may be available via the Internet. We showed how to create formatted output by using format strings, which allows for structured output as well as formatted numeric values, columns of data, and justification. We used list comprehension to filter the external data. We also accessed real earthquake data on the Internet in both CSV and JSON formats and used statistical functions to analyze the data. Finally, we developed another statistical function called correlation.
comma-separated values (CSV)
formatted string
filtering
infinite loop
iterator
JSON
list comprehension ...
Read now
Unlock full access