《Python数据分析技术栈》第08章数据分析案例研究 01 方法 Methodology
In the last chapter, we looked at the various Python-based visualization libraries and how the functions from these libraries can be used to plot different graphs. Now, we aim to understand the practical applications of the concepts we have discussed so far with the help of case studies. We examine the following three datasets:
在上一章中,我们介绍了各种基于 Python 的可视化库,以及如何使用这些库中的函数绘制不同的图形。现在,我们将通过案例研究来了解迄今为止所讨论概念的实际应用。我们将研究以下三个数据集:
For the first case study, you need to refer to the following Wikipedia URL (data is taken directly from the web page):https://en.wikipedia.org/wiki/List_of_2018_box_office_number-one_films_in_France
第一个案例研究需要参考以下维基百科网址(数据直接取自网页):https://en.wikipedia.org/wiki/List_of_2018_box_office_number-one_films_in_France
For the second case study, download a CSV file from the following link:https://github.com/DataRepo2019/Data-files/blob/master/NSIT%20Dwarka.csv
关于第二个案例研究,请从以下链接下载 CSV 文件:https://github.com/DataRepo2019/Data-files/blob/master/NSIT%20Dwarka.csv
For the third case study, download an Excel file from the following link: https:// github.com/DataRepo2019/Data-files/blob/master/COVID-19-geographicdisbtribution-worldwide-2020-06-29.xlsx
关于第三个案例研究,请从以下链接下载 Excel 文件:https:// github.com/DataRepo2019/Data-files/blob/master/COVID-19-geographicdisbtribution-worldwide-2020-06-29.xlsx
In addition to the modules and libraries we used in the previous chapters (including Pandas, NumPy, Matplotlib, and Seaborn), we use the requests module in this chapter to make HTTP requests to websites.
除了我们在前几章中使用过的模块和库(包括 Pandas、NumPy、Matplotlib 和 Seaborn),我们还在本章中使用 requests 模块向网站发出 HTTP 请求。
To use the functions contained in this module, import this module in your Jupyter notebook using the following line:
要使用本模块中包含的函数,请在 Jupyter 笔记本中使用以下一行导入本模块:
import requests
If the requests modules is not installed, you can install it using the following command on the Anaconda Prompt.
如果未安装请求模块,可在 Anaconda 提示符下使用以下命令进行安装。
pip install requests
We will be using the following methodology for each of the case studies:
我们将对每个案例研究采用以下方法:
Open a new Jupyter notebook, and perform the following steps:
打开一个新的 Jupyter 笔记本,然后执行以下步骤:
Data wrangling
数据处理
Visualize the data using univariate, bivariate, and multivariate plots
使用单变量、双变量和多变量图直观显示数据
Summarize your insights, including observations andrecommendations, based on your analysis
根据您的分析,总结您的见解,包括意见和建议