From Excel to Python: Easily Process Excel Data with Python (2nd Edition) cover

From Excel to Python: Easily Process Excel Data with Python (2nd Edition)

Rating 3.8
Word count
119K words
Chapters
107
ISBN
9787121476129

Tags

Summary

This book is a Python data processing guide written for professionals in non-IT fields. Because it is not aimed at professional programmers, the presentation is plain and easy to follow. To help readers gain a deeper understanding of Python concepts as they learn, the book adopts a learn-and-apply-immediately approach: while introducing each concept, it weaves it into a case application, and each case application is presented as "state the problem to solve → find the approach to solving it → show the before-and-after comparison → provide the code that solves it → analyze the code step by step." This way, readers learn the Python concepts, clarify their approach to solving problems, and master coding techniques all at once. The main content of the book includes Python basics, Python third-party libraries, loop and branch statements, string processing techniques, list processing techniques, tuple processing techniques, dictionary processing techniques, set processing techniques, Python user-defined functions, applications of common higher-order functions, the openpyxl library, comprehensive application cases combining Python and Excel, and the Pandas data analysis library.

Editor's review

This book has a very clear positioning: it is aimed at workplace readers in non-IT fields and helps them make a smooth transition from Excel work habits to a Python data processing mindset. Many Python data processing books on the market assume readers have programming foundations, whereas this book deliberately lowers the threshold in both its presentation and its organization of cases, embedding concepts into specific tasks and using a closed-loop explanation of "state the problem—clarify the approach—compare results—give the code—analyze line by line." Following along, readers both understand the syntax and figure out why it is written that way. In terms of content arrangement, the first half covers basic Python syntax, strings, lists, tuples, dictionaries, sets, user-defined functions, and common higher-order functions, while the second half moves on to the openpyxl library, comprehensive applications of Python and Excel, and the Pandas data analysis library, forming a complete path from language entry to office-scenario implementation. For people who work with spreadsheets every day and want to escape repetitive manual operations, this "learn and apply immediately" structure is friendlier than a systematic textbook. In its content organization, the second edition continues the practical orientation of the first edition and is suitable both as a desk reference to consult and practice with and as an introductory textbook for internal training within an organization. One reminder: this book focuses on application rather than computer science principles; after reading it you can solve practical problems, but it does not replace a systematic programming course.

Who it's for

A good fit for

  • Workplace professionals who frequently handle Excel reports and want to use scripts to replace repetitive manual operations
  • Complete beginners with no programming background who want to enter Python through office scenarios
  • Business analysts who need to connect Excel data to Pandas for further analysis
  • Instructors responsible for internal office automation training who need an accessible textbook

Not a good fit for

  • Programmers who already have a solid Python foundation and want to delve into the language's underlying mechanisms
  • Computer science students who want to systematically study algorithms and data structures and prepare for technical interviews
  • Readers who mainly use WPS or other spreadsheet software and do not plan to migrate to Python in the short term

Reading tips

  1. First set up the Python environment and an editor, and type out every chapter's code yourself; do not just read without practicing.
  2. Proceed in the order "basic syntax—openpyxl—Pandas"; skipping around makes it easy to get stuck at the comprehensive cases.
  3. Use a real spreadsheet of your own as practice material, and rewrite it as a script as you learn.
  4. When you hit an error, first review the "approach" part of the case, then check the code line by line.

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章 Python基础——学习Python必知必会
  5. 1.1 什么是Python
  6. 1.2 为什么要学习使用Python处理Excel表格
  7. 1.3 手把手教你安装Python
  8. 1.4 安装Python集成开发工具PyCharm
  9. 1.5 Python的输出与输入
  10. 1.6 Python的代码注释
  11. 1.7 Python对象详解
  12. 1.8 Python中的数字与字符串
  13. 1.9 算术运算符
  14. 1.10 比较运算符
  15. 1.11 赋值运算符
  16. 1.12 逻辑运算符
  17. 1.13 成员运算符
  18. 1.14 格式化字符串
  19. 1.15 断点调试
  20. 第2章 Python库——第三方库的安装与学习
  21. 2.1 什么是模块、包、库
  22. 2.2 安装Excel读取库xlrd
  23. 2.3 导入xlrd模块
  24. 2.4 读取Excel工作簿、工作表信息
  25. 2.5 读取Excel行、列、单元格信息
  26. 2.6 安装Excel写入库xlwt
  27. 2.7 新建工作簿、新建工作表和将数据写入单元格
  28. 2.8 安装Excel修改库xlutils
  29. 2.9 修改工作簿、工作表、单元格
  30. 第3章 Python流程控制——循环语句与分支语句
  31. 3.1 for循环语句
  32. 3.2 while循环语句
  33. 3.3 if条件语句
  34. 3.4 if条件分支语句
  35. 3.5 if多条件分支语句
  36. 3.6 break语句
  37. 3.7 continue语句
  38. 第4章 Python有序对象——字符串处理技术
  39. 4.1 字符串切片
  40. 4.2 字符串统计
  41. 4.3 字符串查找
  42. 4.4 字符串替换
  43. 4.5 字符串的拆分与合并
  44. 第5章 Python有序对象——列表处理技术
  45. 5.1 列表的创建与删除
  46. 5.2 列表切片
  47. 5.3 列表元素的增加、删除和修改
  48. 5.4 列表操作符
  49. 5.5 列表推导式
  50. 5.6 列表的转换
  51. 5.7 常用列表统计方式
  52. 第6章 Python有序对象——元组处理技术
  53. 6.1 元组的创建与删除
  54. 6.2 元组的基本操作
  55. 6.3 常用元组统计函数
  56. 第7章 Python无序对象——字典处理技术
  57. 7.1 字典的基本操作
  58. 7.2 字典键值的增加、删除和修改
  59. 7.3 字典的转换
  60. 7.4 字典综合应用案例
  61. 第8章 Python无序对象——集合处理技术
  62. 8.1 集合的创建与删除
  63. 8.2 集合元素的添加与删除
  64. 8.3 集合之间的大小比较
  65. 8.4 集合的转换
  66. 8.5 集合的运算
  67. 8.6 集合运算应用案例
  68. 第9章 优化代码利器——Python自定义函数
  69. 9.1 自定义函数编写规范
  70. 9.2 必选参数的写法及应用
  71. 9.3 可选参数的写法及应用
  72. 9.4 关键字参数的写法及应用
  73. 9.5 不定长参数的写法及应用
  74. 9.6 匿名函数的写法及应用
  75. 9.7 将自定义函数存放在.py文件中
  76. 第10章 Python高阶函数——常用高阶函数应用
  77. 10.1 转换函数map
  78. 10.2 筛选函数filter
  79. 10.3 排序函数sort与sorted
  80. 第11章 优秀的Python第三方库——openpyxl库
  81. 11.1 安装openpyxl库
  82. 11.2 工作簿的基本操作
  83. 11.3 工作表的基本操作
  84. 11.4 单元格的基本操作
  85. 11.5 工作表的其他操作
  86. 第12章 Python与Excel结合使用——综合应用案例
  87. 12.1 综合应用案例1:自定义排序
  88. 12.2 综合应用案例2:按行各自排序法
  89. 12.3 综合应用案例3:整理不规范的数据
  90. 12.4 综合应用案例4:将一维表转换为二维表
  91. 12.5 综合应用案例5:根据业绩计算提成金额
  92. 12.6 综合应用案例6:查询业绩表中每个月的最高业绩记录
  93. 12.7 综合应用案例7:二维表的多种汇总方式
  94. 12.8 综合应用案例8:按多列分组汇总
  95. 12.9 综合应用案例9:多工作簿数据汇总
  96. 12.10 综合应用案例10:计划招生与实际招生对比
  97. 第13章 数据分析库——Pandas
  98. 13.1 安装Pandas库
  99. 13.2 Pandas对Excel数据的导入与导出
  100. 13.3 创建DataFrame表格
  101. 13.4 列操作
  102. 13.5 行操作
  103. 13.6 数据分支判断
  104. 13.7 数据迭代
  105. 13.8 聚合与分组
  106. 13.9 转换与合并
  107. 13.10 实例应用

FAQ

Can I read this book directly with absolutely no programming background?
Yes. This book is aimed at readers in non-IT fields and starts from basic Python syntax, with plain explanations and concepts embedded in cases. It is recommended that you read the chapters in order and type out the code; when you encounter something you do not understand, first run the case as given, then go back and understand the syntax. It is not advisable to skip the basics and go straight to the comprehensive cases.
Can the content in the book be used directly for everyday Excel report processing?
The second half of the book specifically explains the openpyxl library and comprehensive application cases combining Python and Excel, with ideas built around specific office tasks, so readers can transfer the methods in the cases to their own spreadsheets. However, the specific business logic requires you to adjust the code yourself; what the book provides is general methods and coding techniques, not ready-made business templates.
After finishing this book, do I still need to learn Pandas?
This book already includes content on the Pandas data analysis library, at an introductory level. If your work involves cleaning, grouped statistics, and pivot analysis of relatively large amounts of data, you can, after finishing the Pandas section of this book, find a dedicated data analysis textbook to go deeper. The role of this book is to help you connect Excel and Python.
What is the difference between the second edition and the first edition, and do I need to buy the new edition?
The available information shows that the second edition was published in 2024 and covers Python basics, third-party libraries, various container processing techniques, comprehensive openpyxl and Excel cases, and Pandas. If you already have the first edition and it meets your current needs, you can first compare the table of contents to confirm whether the new edition contains the concepts you need; readers buying for the first time can simply choose the second edition.

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

Zeng Xianzhi is an author focusing on software-learning content. Public information about him is currently limited; it is known that he has two works in the catalog, including From Excel to Python: Easily Processing Excel Data with Python and its second edition. Judging from these titles, he pays attention to combining office software with programming tools, especially helping readers who are familiar with Excel use Python to improve data-processing efficiency and lower the barrier to moving from spreadsheet operations toward programming-based automation. His writing is application-oriented, taking concrete tools and operational scenarios as entry points, and belongs to the practical software-learning genre. Because more personal background is unavailable, no further introduction to his experience or identity can be given; readers may learn about his focus and style through the works mentioned above.

曾智勇 Author

Zeng Zhiyong is an author of software-learning books for office settings, though public information about him is limited. His representative work, From Excel to Python: Handling Excel Data Easily with Python (2nd Edition), falls under software learning. The title shows its focus: helping ordinary Excel users make the transition to Python programming and process spreadsheet data programmatically, rather than teaching programming theory from scratch. Such books tend to emphasize practicality and hands-on operation, targeting people who need to batch-process, organize, and analyze data in daily office work, while lowering the barrier to learning. More public information about the author's writing style and background is unavailable, so no inferences are made about his life.

More by the same author

Top rated in the same category