Python Data Analysis for Beginners: From Data Acquisition to Visualization cover

Python Data Analysis for Beginners: From Data Acquisition to Visualization

Rating 3.5
Word count
290K words
Chapters
40
ISBN
9787121336539

Tags

Summary

This book is an introductory guide to data analysis written by Shen Xiangzhuang and published by Publishing House of Electronics Industry in March 2018. At about 260 pages and 290,000 Chinese characters, it follows the thread of "the complete workflow of data analysis," using Python to connect scattered steps into a single, coherent practical path. Chapter 1 begins with environment setup: building an integrated Python development environment on Ubuntu and Windows, and presenting three common ways to install third-party libraries; it then briefly reviews syntax essentials such as if __name__=='__main__', list comprehensions, decorators, recursive functions, and object-oriented programming, closing with The Zen of Python to help readers develop an overall sense of the language's style. Chapter 2 covers data acquisition—web scraping: starting from the three steps of requesting web pages, parsing pages, and storing data, it then addresses advanced topics including exception handling, the robots.txt convention, dynamic user agents, proxy IPs, encoding detection, regular expressions, simulated login, CAPTCHA handling, retrieval of dynamically loaded content, and multithreading and multiprocessing. Chapter 3 turns to data access and cleaning: it introduces basic file operations and reading and writing of formats and databases such as CSV, JSON, XLSX, and MySQL, explains basic NumPy operations and the use of Series and DataFrame in pandas, and then focuses on encoding issues, missing-value detection, outlier removal, and the cleanup of duplicate and redundant information. Chapter 4 moves into analysis and visualization: the basic workflow of exploratory data analysis and dimensionality reduction, a brief introduction to machine learning, applications of decision trees, a manual implementation of the KNN algorithm, and presentation of results with matplotlib, pandas, seaborn, and word clouds. Chapter 5, "Python and Life," presents three small projects: a customized news alert service (news scraping, email delivery, scheduled execution, and local logging), Python and mathematics (estimates, the Monty Hall problem, and optional solutions to LP and QP problems), and analysis of QQ group chat records. The book does not aim to exhaustively cover syntactic details but emphasizes "getting things done with Python." The chapters are relatively independent, so readers can jump around according to interest; the code and data are hosted on GitHub, allowing readers to practice while reading.

Editor's review

很多Python数据分析书一上来就摆开pandas的API清单,读者学完不知道数据从哪来、结果到哪去。这本书的难得之处是把“流程”摆在第一位:先用一章把Ubuntu和Windows下的环境搭好,把初学者最容易卡住的第三方库安装讲清楚;接着从爬虫抓数据,到CSV、JSON、XLSX、MySQL的存取,再到NumPy与pandas,一直走到matplotlib、seaborn出图,环节之间是接得上的。 第2章的爬虫进阶部分给得相当实在:robots.txt 合规意识、动态UA、代理IP、编码检测、模拟登录、验证码、动态加载、多线程多进程,这些真正动手才会遇到的问题都点了名。第4章不满足于调包,还带读者手动实现KNN、用决策树跑一遍流程,可视化的层次也分得清楚——要画得好用matplotlib,要画得快用pandas,要画得省用seaborn,最后补一张词云图。 第5章三个小项目是全书最有生活气的部分:新闻提醒服务把抓取、邮件推送、定时任务和日志串成闭环;三门问题和LP/QP求解读起来像在玩;QQ群聊天记录分析则是很多人的第一个“真实数据集”。代码托管在GitHub,可以边读边改。它不是一本查手册的书,而是一张入门路线图——想让手上有个完整项目的人,值得一读。

Who it's for

A good fit for

  • 已掌握Python基本语法、想系统走一遍数据分析全流程的初学者
  • 需要自己动手采集数据、做清洗和出图的学生与职场新人
  • 想把爬虫、pandas、matplotlib串成一个完整小项目的自学者
  • 作为高校Python数据分析课程或培训班的辅助读物

Not a good fit for

  • 完全没写过Python、需要从变量和循环学起的零基础读者
  • 想深入统计建模、机器学习算法推导的进阶读者
  • 寻求pandas或matplotlib完整API参考手册的读者
  • 只想要可视化美观技巧、不关心数据获取与清洗的人

Reading tips

  1. 第1章可快速浏览,重点是环境与库安装;装好后立刻跑通书中GitHub上的示例代码。
  2. 按“获取—存取清洗—分析可视化—项目”的顺序读,每章配一个自己的数据集练手。
  3. 第2章爬虫务必遵守robots.txt与网站条款,控制请求频率,只在合法范围内练习。
  4. 第5章三个项目建议完整复现一遍,尤其新闻提醒服务,可体会定时任务与日志的实际写法。

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. Chapter 1 Preparation
  2. 1.1 Setting Up the Development Environment
  3. 1.1.1 Setting Up an Integrated Python Development Environment on Ubuntu
  4. 1.1.2 Setting Up an Integrated Python Development Environment on Windows
  5. 1.1.3 Three Methods for Installing Third-Party Libraries
  6. 1.2 Introduction to Basic Python Syntax
  7. 1.2.1 if __name__=='__main__'
  8. 1.2.2 List Comprehensions
  9. 1.2.3 Decorators
  10. 1.2.4 Recursive Functions
  11. 1.2.5 Object-Oriented Programming
  12. 1.3 The Zen of Python
  13. Chapter 2 Data Acquisition
  14. 2.1 Introduction to Crawlers
  15. 2.2 Data Scraping in Practice
  16. 2.2.1 Requesting Web Page Data
  17. 2.2.2 Web Page Parsing
  18. 2.2.3 Data Storage
  19. 2.3 Advanced Crawler Topics
  20. 2.3.1 Exception Handling
  21. 2.3.2 robots.txt
  22. 2.3.3 Dynamic User Agents
  23. 2.3.4 Proxy IPs
  24. 2.3.5 Encoding Detection
  25. 2.3.6 Introduction to Regular Expressions
  26. 2.3.7 Simulated Login
  27. 2.3.8 CAPTCHA Issues
  28. 2.3.9 Acquiring Dynamically Loaded Content
  29. 2.3.10 Multithreading and Multiprocessing
  30. 2.4 Crawler Summary
  31. Chapter 3 Data Access and Cleaning
  32. 3.1 Data Access
  33. 3.1.1 Basic File Operations
  34. 3.1.2 Reading and Writing CSV Files
  35. 3.1.3 Reading and Writing JSON Files
  36. 3.1.4 Reading and Writing XLSX Files
  37. 3.1.5 Reading and Writing MySQL Database Files
  38. 3.2 NumPy
  39. 3.2.1 Introduction to NumPy
  40. 3.2.2 Basic NumPy Operations

FAQ

这本书适合完全没有编程基础的人吗?
不太适合。作者明确希望读者有一定Python语法基础,第1章只是回顾列表解析式、装饰器、面向对象等要点。零基础读者建议先学完一本Python入门书,再回来看这本的数据流程。
书里的代码和数据集能下载吗?
可以。作者将全部代码与相关数据托管在GitHub(仓库名为Python数据分析和学习相关路径),书末与作者博客均有说明,读者可下载后对照运行。
书中用的是Python 2还是Python 3?
从目录中的列表解析式、装饰器、NumPy与pandas用法看,全书按Python 3的生态环境讲授,第三方库以requests、BeautifulSoup、pandas、matplotlib、seaborn为主。具体版本请以书中示例环境为准。
爬虫部分讲得够不够深入?
对入门者够用。除请求、解析、存储三步外,还覆盖异常处理、robots.txt、动态UA、代理IP、编码检测、正则、模拟登录、验证码、动态加载与多线程多进程,但未涉及大规模分布式抓取与反爬对抗。
这本书的豆瓣评分是多少?
豆瓣评分约为7.0分,评价人数不多,分值参考意义有限;不同平台打分差异较大,建议结合目录与前言判断是否匹配自己的需求。

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