Python数据处理
透过 Python 让读者有能力处理数据,读者掌握数据表达的重要性,进而将数据以更浅显易懂的方式,透过视觉的方式来呈现数据所代表的特性。
第 1 章Python 基础
1-01 Python 安装与说明
1-01-1 python 启动器 py
1-01-2 安装 VS Code for Python
1-02 基础语法
1-02-1 数字、注解、变量与程序区块
1-02-2 Python 字符串
1-03 Python 基本数据类型
1-03-1 Python 集合
1-04 Python 分支控制
1-05 Python 函数与模块
1-05-1 内部函数与闭包
1-05-2 lambda 与模块
References
- Python 文档目录,docs.python.org/zh-cn/3.7/c…
- PEP 397 -- Python launcher for Windows, www.python.org/dev/peps/pe…
- 什么是 Python Launcher?, blog.csdn.net/wuShiJingZu…
- Getting Started with Python in VS Code, code.visualstudio.com/docs/python…
- Using Python environments in VS Code, code.visualstudio.com/docs/python…
- 浅拷贝与深拷贝,zhuanlan.zhihu.com/p/56741046
- 求最大公因数的几种方法,so.html5.qq.com/page/real/s…
第 2 章Python 数据工具
2-01 NumPy 介绍、安装与加载
2-02 数组索引与切片方法
2-02-1 NumPy 数据类型
2-02-2 NumPy 创建 ndarray 对象
2-02-3 NumPy 切片和索引
2-03 Pandas 介绍、安装与加载
2-04 Series 操作
2-05 DataFrame 操作
References
- NumPy 教程,www.runoob.com/numpy/numpy…
- Python 3 教程,www.runoob.com/python3/pyt…
- pandas documentation,pandas.pydata.org/pandas-docs…
- Installing pandas, pandas.pydata.org/pandas-docs…
- Python Package Index, pypi.org/
- Python下opencv库的安装过程与一些问题汇总,www.cnblogs.com/BIXIABUMO/p…
- Links for opencv-python, mirrors.tuna.tsinghua.edu.cn/pypi/web/si…
第 3 章数据处理
3-01 数据处理
3-01-1 数据结构
3-01-2 数据操作
3-01-3 数据统计
3-02 数据加载
3-02-1 数据加载CSV
3-02-2 存储与加载 JSON 文件
3-02-3 存储与加载 Excel 文件
3-03 数据清洗与合并
数据预处理包含了数据清洗 (data cleansing) 与特征工程 (feature engineering) ,本节主要介绍的是数据清洗部份,主要目的是将原始数据转换成整洁的、组织合理的形式以供后续的特征工程使用。而数据清洗的工作内容很多,举例来说:
- 基础运算 (basic) - 选择、过滤、删除重复项。
- 取样 (Sampling) - 基于绝对、相对或是概率。
- 数据划分 (Data Partitioning) - 将数据集划分为训练、验证、测试数据集。
- 装箱 (Binning) - 这是用于减少微小观测误差影响的技术,常见的应用如直方图 (Histograms)。
- 转换 (Transformations) - 如标准化,标准化,缩放,旋转。
- 数据替换 (Data Replacement) - 剪切、拆分、合并。
- 插补 (Imputation) - 使用统计算法替换缺失的观察值。
- 加权 (Weighting) - 属性加权。
本节将会介绍基础运算中的过滤、找出缺失值、删除重复项以及数据替换中的剪切、拆分、合并。
3-03-1 泰坦尼克号竞赛 - 数据过滤
3-03-2 泰坦尼克号竞赛-数据替换与合并
References
- Pandas 中文教程,www.w3cschool.cn/hyspo/
- Pandas cookbook,github.com/jvns/pandas…
- pandas.read_csv函数参数详解,zhuanlan.zhihu.com/p/129858983
- Data Preprocessing vs. Data Wrangling in Machine Learning Projects, www.infoq.com/articles/ml…
- Data Preparation, rapidminer.com/products/st…
- Titanic: Machine Learning from Disaster, www.kaggle.com/c/titanic
- DataFrame - pandas 1.1.4 documentation, pandas.pydata.org/pandas-docs…
- Merge, join, concatenate and compare, pandas.pydata.org/pandas-docs…
第 4 章Python 数据可视化
4-01 可视化包介绍、安装与加载
4-02 Matplotlib
4-02-1 Matplotlib 中文化
4-02-2 Matplotlib 图片属性
4-02-3 Matplotlib 散点图、发散型条形图、饼图
4-03 Pandas
4-03-1 Pandas - 折线图、柱状图、直方图、箱型图
4-03-2 Pandas - 散点图、安德鲁斯曲线
4-04 Seaborn
References
- Pandas Visualization, pandas.pydata.org/pandas-docs…
- Matplotlib: Visualization with Python, matplotlib.org/
- seaborn: statistical data visualization, seaborn.pydata.org/
- Top 50 matplotlib Visualizations – The Master Plots, www.machinelearningplus.com/plots/top-5…
- Datasets collected from R packages, github.com/selva86/dat…
- Midwest demographics, ggplot2.tidyverse.org/reference/m…
- midwest: Midwest demographics, rdrr.io/github/Saha…
- mtcars: mtcars, rdrr.io/github/matt…
- seaborn dataset, github.com/mwaskom/sea…
- seaborn: statistical data visualization, github.com/mwaskom/sea…
第 5 章Python 项目移植
当使用者完成一个 Python 项目的时后,要将这个代码移交给他人可能会遇到的问题有以下三种情况:
- Python 解释器:有无安装或版本不同。
- 相关包: 代码中有需要使用的包。
- 操作系统: Windows, Mac OS, Linux等不同操作环境。
5-01 Python 项目移植-Windows 执行文件
5-02 虚拟环境搭建
5-03 Container 环境搭建
5-04 无伺服器环境搭建
References
- PEP 0 -- Index of Python Enhancement Proposals (PEPs), www.python.org/dev/peps/
- Virtual Environment, book.pythontips.com/en/latest/v…
- Installing packages using pip and virtual environments, packaging.python.org/guides/inst…
- venv — Creation of virtual environments, docs.python.org/3/library/v…
- PEP 405 -- Python Virtual Environments, www.python.org/dev/peps/pe…
- PyInstaller, www.pyinstaller.org/
- How to Install PyInstaller, pyinstaller.readthedocs.io/en/latest/i…
- PyInstaller Manual, pyinstaller.readthedocs.io/en/stable/
- GUI应用, pythonguidecn.readthedocs.io/zh/latest/s…
- Usage - Matplotlib 2.0.2 documentation, matplotlib.org/faq/usage_f…
- Packaging PyQt5 & PySide2 applications for Windows, with PyInstaller, www.learnpyqt.com/tutorials/p…
- The Hitchhiker’s Guide to Python!, docs.python-guide.org/en/latest/
- Installing Tk on Windows, tkdocs.com/tutorial/in…
- Freezing Your Code, docs.python-guide.org/shipping/fr…
- Install Docker Desktop on Window, docs.docker.com/docker-for-…
- python Docker Official Images, hub.docker.com/_/python?ta…
- 适用于 Linux 的 Windows 子系统安装指南 (Windows 10), docs.microsoft.com/zh-cn/windo…
- The base command for the Docker CLI, docs.docker.com/engine/refe…
- Docker 命令大全, www.runoob.com/docker/dock…
- [Day 15] Docker (1), ithelp.ithome.com.tw/articles/10…
- Windows上做Python开发太痛苦?Docker了解一下, zhuanlan.zhihu.com/p/50864774
- Day5: 實作撰寫第一個 Dockerfile, ithelp.ithome.com.tw/articles/10…
- AWS Lambda, aws.amazon.com/cn/lambda/?…
- Python 中的 AWS Lambda 部署程序包, docs.aws.amazon.com/zh_cn/lambd…
- 构建具有依赖项的应用程序, docs.aws.amazon.com/zh_cn/serve…
- Creating New AWS Lambda Layer For Python Pandas Library, medium.com/@qtangs/cre…