Python Data Analysis: A Beginner's Guide to NumPy, 2nd Edition cover

Python Data Analysis: A Beginner's Guide to NumPy, 2nd Edition

No rating yet
Word count
371K words
Chapters
11
Series
Turing Programmer's Bookshelf
ISBN
9787115339409

Tags

Summary

This is an introductory NumPy tutorial for beginners. NumPy is the foundational library of Python's scientific computing ecosystem, providing multidimensional array objects, a large set of mathematical functions and efficient vectorized operations; it can replace many common features of Matlab and Mathematica and is free and open source. The book starts with installation: configuring Python, NumPy, Matplotlib, SciPy and IPython on different operating systems, building a first NumPy program through a small example such as vector addition, then systematically covering array objects and data types, indexing and slicing, reshaping and combining/splitting, reading and writing files and CSVs, and common statistical and financial functions (volume-weighted average price, moving averages, Bollinger bands and so on, all illustrated with stock data). It then moves to advanced material: convenience functions and polynomial fitting, matrices and universal functions (ufuncs), the linear algebra module (inverses, solving linear systems, eigenvalues, singular value decomposition, determinants), fast Fourier transforms and random number distributions, specialized functions (sorting, searching, financial functions, window functions, special mathematical functions), writing unit tests for NumPy code with the assert family of functions, plotting with Matplotlib, and integrated applications of SciPy, Scikits and Pygame. Sections mostly follow a "Time for Action" and "What Just Happened" structure with short examples and explanations, suited to typing along as you read. The Chinese edition has 11 chapters and 226 pages.

Editor's review

国内 NumPy 中文入门书一直不多,这本由 Packt 原版引进、图灵程序设计丛书出品的教程,正好补上了这一空缺。它最大的优点是「不绕弯子」:每一节几乎都从一个小任务出发,先给代码,再解释「刚才做了些什么」,读者照着敲一遍就能看到结果,对自学非常友好。其次,内容覆盖完整,除数组、索引、通用函数这些核心知识外,还延伸到线性代数、傅里叶变换、随机分布、窗函数与金融函数,并把 Matplotlib 绘图和 SciPy 单独成章,读完能串起 Python 科学计算的整条工具链。再次,示例大多带真实情境(股票收益率、布林带、信号滤波、图像与音频处理),比纯语法演示更容易记住。需要提醒的是,原书写作年代较早,示例基于 Python 2 与旧版 NumPy,部分 API(如矩阵类、随机数模块)在今天的版本中已有变化,读者需对照新版官方文档调整。作为打基础的入门读物,它依然值得放在案头。

Who it's for

A good fit for

  • 具备 Python 基础语法、想进入数值计算与数据分析的初学者
  • 从 Matlab 或其他科学计算环境转用 Python 的科研人员与工程师
  • 需要处理数组型数据、做统计与信号分析的高校学生
  • 希望系统补齐 NumPy 知识短板的初中级程序员

Not a good fit for

  • 完全没有编程经验、需要从变量和循环学起的零基础读者
  • 只想学 pandas 做表格业务分析、不打算碰底层数组运算的人
  • 期待最新 API 与新版 NumPy 特性、不愿自行查文档的读者

Reading tips

  1. 务必边读边敲代码,每节的「动手实践」都亲手跑一遍,比只读示例有效得多。
  2. 按章节顺序推进,第1至3章打好数组与函数基础,再进入第5、6章的矩阵与线性代数。
  3. 遇到旧版 API 报错时,对照 NumPy 官方文档查找替代写法,把差异记录下来。
  4. 读完第8、9章后,尝试用 Matplotlib 复现书中的股票图表,检验自己的掌握程度。

About the publisher

Posts & Telecom Press China · Founded in 1953

Posts & Telecom Press is known for its strengths in science and technology, computing, and information and communications titles, and has extended its publishing into photography, art, software learning, and inspirational growth, giving it a fairly diverse range. Its catalog includes computing and communications works such as Refactoring and Patterns (Revised Edition) and Huawei Switch Learning Guide (Second Edition), alongside bilingual collector's editions such as The Little Prince (Chinese-English-French illustrated collector's edition), The Great Gatsby, and Three Days to See. Beijing Ten Years: 1980-1990 and Ghost Blade: WLOP Personal Illustration Collection reflect its presence in photography and art. Its authors include Antoine de Saint-Exupéry, Helen Keller, Joshua Kerievsky, Wang Da, Zhang Zhaozeng, and WLOP.

Contents

  1. Chapter 1: Getting Started with NumPy
  2. Chapter 2: NumPy Basics
  3. Chapter 3: Common Functions
  4. Chapter 4: Convenience Functions
  5. Chapter 5: Matrices and Universal Functions
  6. Chapter 6: In-Depth Study of the NumPy Module
  7. Chapter 7: Specialized Functions
  8. Chapter 8: Quality Control
  9. Chapter 9: Plotting with Matplotlib
  10. Chapter 10: Extending NumPy: SciPy
  11. Chapter 11: Playing with Pygame

FAQ

这本书和英文原版《NumPy 1.5 Beginner's Guide》是同一本吗?
不是同一版本。英文版《NumPy 1.5 Beginner's Guide》初版于 2011 年,共 10 章;中文版《Python数据分析基础教程:NumPy学习指南(第2版)》译自其第二版《NumPy Beginner's Guide, Second Edition》,共 11 章,新增了 Pygame 应用内容。
书中示例还能在新版 NumPy 上运行吗?
多数核心示例(数组创建、索引切片、通用函数、线性代数)可直接运行,但书中基于较早的 Python 2 与旧版 NumPy,矩阵类、随机数模块等接口已有调整,遇到报错应查阅当前官方文档改写。
需要先学 Python 才能读吗?
需要。原书定位是有基本 Python 知识的读者,书中不讲解语法基础,只演示 NumPy 的用法,建议先掌握列表、循环、函数与模块导入再开始。
书里的股票数据案例需要金融背景吗?
不需要。案例只是借用股票价格演示平均值、移动平均、布林带等计算,书中会说明每步在算什么,懂基础统计概念即可跟上。

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.

Top rated in the same category