Python Data Analysis: From Novice to Expert cover

Python Data Analysis: From Novice to Expert

Rating 3.0
Word count
90K words
Chapters
175
ISBN
9787121409233

Tags

Summary

This book has 13 chapters and covers Python syntax and data analysis methods. Chapter 1 mainly introduces the concept of data analysis to give readers a general impression and briefly introduces the five Python third-party libraries frequently used in the book. Chapter 2 mainly covers preparation, walking readers step by step through setting up a Python environment, including installing Python 3.7.6 and pip. Chapter 3 introduces the basics of Python programming. Chapters 4 to 7 introduce the foundational libraries for simple data analysis with Python, including NumPy, Pandas, and Matplotlib, and cover methods for processing data with regular expressions. Chapters 8 to 13 are more advanced but still foundational to Python data analysis, introducing, in conjunction with machine learning, some common machine learning algorithms used for data analysis and commonly used mathematical models.

Editor's review

This book has a clear positioning: starting from zero and stringing Python syntax and common data analysis tools into a single learning path. The first few chapters cover the concept of data analysis, environment setup, and programming basics, making them relatively friendly to those without programming experience; the book then moves on to NumPy, Pandas, Matplotlib, and regular expressions, covering the basic steps of data cleaning, processing, and visualization; the later chapters introduce common algorithms and mathematical models in conjunction with machine learning, giving readers a preliminary understanding of advanced directions. Its value lies in putting "learning syntax" and "doing analysis" in the same book, reducing the burden on beginners of jumping among multiple resources. Readers are advised to type out the code as they read, practice each chapter with a small dataset, and be sure to complete the environment setup hands-on. Note that data analysis skills are built through projects: after finishing, you should find real data and run through a complete analysis workflow rather than stopping at the sample code.

Who it's for

A good fit for

  • Readers with no programming background who want a systematic introduction to Python data analysis
  • Students who need a textbook covering syntax, common libraries, and basic algorithms
  • Career changers who want to use Python to process data and do basic visualization
  • Learners with some Excel experience who want to transition to programming-based analysis

Not a good fit for

  • Readers already proficient with Pandas and machine learning libraries who seek advanced modeling techniques
  • Those who only want to quickly learn a particular visualization tool and are unwilling to systematically learn programming basics
  • Readers who need hands-on content on deep learning frameworks or big data platforms

Reading tips

  1. Complete the environment setup in Chapter 2 first, and make sure Python and pip are available before moving on to later chapters
  2. Type out each chapter's code yourself; when you hit an error, troubleshoot it yourself first and then check the book's explanation
  3. After learning NumPy and Pandas, find a dataset you care about and practice cleaning and statistics on it
  4. When reading the machine learning chapters, focus on understanding what the algorithms are for and their inputs and outputs rather than delving into mathematical derivations from the start

About the publisher

Publishing House of Electronics Industry China · Founded in 1982

The Publishing House of Electronics Industry is a comprehensive publisher distinguished by its focus on electronic information and related fields. Judging from the more than 3,000 titles in its catalogue, its publishing covers programming and design, artificial intelligence, computer science, finance and economics, photography, and social sciences, attending both to cutting-edge technology and to general readers. Representative titles include Factor Investing: Methods and Practice, x86 Assembly Language: From Real Mode to Protected Mode, The RISC-V Reader, Artificial Intelligence: Speech Recognition, Understanding and Practice, Phased Array Radar Technology, Radar Target Characteristics, and 100 Go Mistakes and How to Avoid Them, most of which centre on technical methods and engineering practice. Its authors include Shi Chuan, Li Zhong, Wang Xiaobo, David Patterson, Andrew Waterman, and Yu Zihao, among others from China and abroad. Owing to limited public information, no further publishing features are elaborated here.

Contents

  1. 版权信息
  2. 内容简介
  3. 前言
  4. 第1章 数据分析存在的意义
  5. 1.1 数据分析与Python
  6. 1.1.1 数据科学和数据分析的始末
  7. 1.1.2 为什么使用Python作为脚本
  8. 1.2 本书的主要内容
  9. 1.2.1 数据分析基础:NumPy、Pandas和Matplotlib库概述
  10. 1.2.2 数据处理:NumPy库简介
  11. 1.2.3 数据处理:Pandas库简介
  12. 1.2.4 图表绘制:Matplotlib库简介
  13. 1.2.5 中坚力量:Sklearn和Statsmodels库简介
  14. 第2章 开始前的准备
  15. 2.1 Python 3.7.6的安装
  16. 2.1.1 Python3和Python2的区别
  17. 2.1.2 在Windows 10系统中下载并安装Python 3.7.6
  18. 2.1.3 手动配置环境变量
  19. 2.2 pip的安装
  20. 2.2.1 pip是什么
  21. 2.2.2 在Windows系统中下载和安装pip
  22. 2.2.3 使用pip命令下载和管理pip
  23. 第3章 Python编程基础
  24. 3.1 Python编程初识
  25. 3.1.1 第一个Python程序
  26. 3.1.2 整型、浮点型、布尔型与复数型
  27. 3.1.3 不同数据类型之间的运算法则
  28. 3.1.4 Python中的常用内建函数
  29. 3.2 Python编程常用类型
  30. 3.2.1 Python的列表
  31. 3.2.2 Python的元组
  32. 3.2.3 Python的字典
  33. 3.2.4 Python的字符串
  34. 3.3 Python的条件、循环和分支语句以及异常处理
  35. 3.3.1 Python的编程风格
  36. 3.3.2 错误、异常和异常处理
  37. 3.3.3 条件语句:if、if-else和elif
  38. 3.3.4 循环语句:while和for
  39. 3.4 其他关于Python的重要知识点
  40. 3.4.1 匿名函数lambda
  41. 3.4.2 Python自定义类与打印函数
  42. 第4章 线性代数知识和第三方库NumPy的使用
  43. 4.1 必要的线性代数知识
  44. 4.1.1 线性代数综述
  45. 4.1.2 行列式
  46. 4.1.3 矩阵及矩阵的运算
  47. 4.1.4 矩阵的初等变换与秩、向量组与线性相关
  48. 4.1.5 相似矩阵
  49. 4.2 NumPy库的基础操作
  50. 4.2.1 NumPy库的安装和基本方法
  51. 4.2.2 创建一个数组
  52. 4.2.3 索引、切片和迭代
  53. 4.2.4 拼合、划分一个矩阵
  54. 4.2.5 深拷贝、浅拷贝与不拷贝
  55. 4.3 用NumPy库实现矩阵运算
  56. 4.3.1 矩阵基本运算一(矩阵加法、矩阵减法、矩阵数乘)
  57. 4.3.2 矩阵基本运算二(矩阵相乘、逆矩阵、矩阵的特征值和特征向量)
  58. 第5章 使用正则表达式处理数据
  59. 5.1 RE模块简述
  60. 5.1.1 正则表达式(RE)模块使用的符号
  61. 5.1.2 正则表达式的匹配规则
  62. 5.2 使用正则表达式模块
  63. 5.2.1 匹配对象方法group()和groups()的用法
  64. 5.2.2 使用管道符进行匹配
  65. 符号实现多个条件匹配
  66. 5.2.4 一些特殊格式的正则表达式匹配模式
  67. 第6章 使用Pandas库处理数据
  68. 6.1 Pandas库简述
  69. 6.1.1 Pandas库能做什么
  70. 6.1.2 Pandas库功能简述
  71. 6.2 三种格式的文件后缀简述
  72. 6.2.1 什么是CSV文件
  73. 6.2.2 Python自带的CSV模块
  74. 6.2.3 为什么要将TXT和Excel文件转化为CSV文件
  75. 6.3 处理.csv格式的数据
  76. 6.3.1 用read_csv()和head()读取CSV文件并显示其行/列
  77. 6.3.2 查看列数、维度以及切片操作
  78. 6.3.3 读取特定的列以及列的改值操作
  79. 6.3.4 求某一列的最大值、最小值、算术平均数以及数据的排序
  80. 6.3.5 Pandas库的写入操作——to_csv()方法
  81. 6.4 处理非.csv格式的数据
  82. 6.4.1 用Pandas库读取TXT文件
  83. 6.4.2 用Pandas库读取Excel文件
  84. 6.5 Pandas库的其他常用操作
  85. 6.5.1 新增DataFrame数据结构的意义
  86. 6.5.2 创建与遍历DataFrame数据结构
  87. 6.5.3 检索已有的DataFrame数据结构
  88. 6.5.4 DataFrame数据结构的选择操作
  89. 6.5.5 处理DataFrame数据结构中的缺失数据
  90. 第7章 使用Matplotlib库实现数据可视化
  91. 7.1 Matplotlib库简述
  92. 7.1.1 Matplotlib库的安装
  93. 7.1.2 Matplotlib库常见的问题
  94. 7.2 Matplotlib库的基本方法
  95. 7.2.1 设定x轴与y轴的相关内容
  96. 7.2.2 “点”和“线”样式的设定
  97. 7.3 使用Matplotlib库绘制图表
  98. 7.3.1 绘制柱状图
  99. 7.3.2 绘制直方图
  100. 7.3.3 绘制散点图
  101. 7.3.4 绘制饼状图
  102. 7.3.5 绘制折线图
  103. 第8章 数学模型与数理统计
  104. 8.1 走进数学模型
  105. 8.1.1 什么是数学模型
  106. 8.1.2 建立数学模型的一般步骤
  107. 8.1.3 数学模型示例
  108. 8.2 必要的数理统计知识
  109. 8.2.1 样本、总体、个体、统计量
  110. 8.2.2 3个重要的分布:χ2分布、t分布、f分布
  111. 8.2.3 点估计、矩估计与区间估计
  112. 8.2.4 全概率公式和贝叶斯公式
  113. 8.2.5 依概率收敛与切比雪夫不等式
  114. 第9章 线性回归
  115. 9.1 最小二乘法与切比雪夫准则
  116. 9.1.1 最小二乘法的数学原理
  117. 9.1.2 切比雪夫准则的数学原理
  118. 9.2 OLS回归模型
  119. 9.2.1 OLS回归模型的概念
  120. 9.2.2 如何生成测试数据
  121. 9.2.3 OLS回归模型的代码实现和可视化
  122. 9.3 LAD回归模型
  123. 9.3.1 LAD回归模型的概念
  124. 9.3.2 LAD回归模型的代码实现和可视化
  125. 9.4 OLS回归模型与LAD回归模型
  126. 9.4.1 比较OLS回归模型与LAD回归模型的拟合曲线
  127. 9.4.2 简单的一元线性回归分析的代码展示
  128. 9.5 从极大似然估计再审视线性回归
  129. 9.5.1 从传统的数理统计到线性回归
  130. 9.5.2 极大似然估计
  131. 9.5.3 假设检验基本概念
  132. 9.5.4 区间估计、置信区间和置信限
  133. 第10章 分类问题与逻辑回归
  134. 10.1 逻辑回归:从分类问题谈起
  135. 10.1.1 从线性回归到分类问题
  136. 10.1.2 逻辑回归与Sigmoid函数
  137. 10.1.3 使用极大似然估计计算Sigmoid函数的损失函数
  138. 10.1.4 逻辑回归模型求解的本质
  139. 10.2 从梯度上升法与梯度下降法到逻辑回归
  140. 10.2.1 梯度上升法和梯度下降法的由来
  141. 10.2.2 梯度下降法及梯度上升法的数学原理
  142. 10.2.3 用Python实现逻辑回归
  143. 10.2.4 题外话:从用Python实现逻辑回归中看psutil库
  144. 10.2.5 逻辑回归可视化:绘制决策边界
  145. 第11章 模型评估与模型改进
  146. 11.1 线性回归模型的评估与改进
  147. 11.1.1 线性回归模型的评估
  148. 11.1.2 模型改进:从一元线性回归到多元线性回归问题
  149. 11.1.3 模型改进:过度拟合与添加、设定惩罚项
  150. 11.2 逻辑回归模型的评估与改进
  151. 11.2.1 分类模型的评估:查准率、查全率及F-score
  152. 11.2.2 分类模型的评估:ROC曲线、AUC指标
  153. 11.2.3 模型改进:随机梯度下降法
  154. 11.2.4 逻辑回归最终代码展示(使用随机梯度下降法)
  155. 第12章 聚类:K-means算法
  156. 12.1 K-means算法及相关内容的基本概念
  157. 12.1.1 聚类与机器学习的概念
  158. 12.1.2 聚类:K-means算法的原理
  159. 12.2 K-means算法的Python实现
  160. 12.2.1 朴素的K-means算法的Python实现
  161. 12.2.2 朴素的K-means算法的Python实现的具体解析
  162. 12.2.3 模型改进:使用不同颜色和形状标记不同的簇
  163. 12.2.4 K-means算法改进:使用二分K-means算法
  164. 第13章 分类:KNN算法
  165. 13.1 KNN算法的基本概念
  166. 13.1.1 KNN算法的相关概念
  167. 13.1.2 KNN算法原理概述
  168. 13.2 KNN算法的Python实现
  169. 13.2.1 制作测试用例数据集
  170. 13.2.2 KNN算法的具体实现
  171. 13.2.3 KNN算法的完整代码
  172. 13.3 结语:关于数据分析
  173. 13.3.1 决策树之前:树的概念
  174. 13.3.2 信息熵和决策树
  175. 13.3.3 写在最后的话:留给机器学习

FAQ

Can I understand this book without a programming background?
You can read it in order. Chapter 3 is devoted to the basics of Python programming, and the earlier chapters include step-by-step environment setup, making it suitable for starting from zero. But learning programming requires hands-on work: don't skip the basic chapters, actually run every piece of code, and when you don't understand something, look up the syntax first before continuing.
What Python version and libraries do the examples in the book use?
According to the introduction, the book uses Python 3.7.6 for environment installation and mainly uses third-party libraries such as NumPy, Pandas, and Matplotlib, while also introducing the use of regular expressions for data processing. With newer Python versions, most basic syntax and common library usage still apply, though some installation details may need to be adjusted to your actual environment.
What level can I reach after finishing this book?
You can master basic Python syntax, use NumPy and Pandas for data processing, use Matplotlib for basic visualization, and understand the basic ideas of common machine learning algorithms and mathematical models. This is a level from beginner to basic intermediate in data analysis; there is still a gap before you can independently complete complex projects, and you will need to practice more with real data afterward.
How deep is the machine learning content in the book?
The later chapters introduce common data analysis algorithms and common mathematical models in conjunction with machine learning. They are positioned as advanced but still basic, focusing on helping readers understand the purpose of the algorithms and the basic workflow rather than in-depth derivations. It is suitable as a first stop for machine learning; for systematic depth, dedicated textbooks are still needed.

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

About the author

田越英 Author

Tian Yueying is an author about whom limited public information is available. What can be confirmed is that the author writes books in the field of programming and design, with one title held in the collection: Python Data Analysis from Beginner to Expert. Judging from the title and its subject category, the book is aimed at newcomers to data analysis and uses the Python language as its tool, seeking to guide learners with no prior background step by step toward completing data analysis tasks independently; its approach is practical and progressive. The author's specific background, professional experience, and research interests in this subject have not appeared in reliable public sources, so it would be inappropriate to speculate. Based on the available information, Tian Yueying's writing is oriented toward beginners and emphasizes practical operability, offering readers who wish to enter the field of Python data analysis a path of study that moves from the basics to more advanced material, and it has some reference value among introductory technical books.

Top rated in the same category