Skip to Content
Python数据科学手册
book

Python数据科学手册

by Jake VanderPlas
January 2018
Intermediate to advanced
470 pages
13h 23m
Chinese
Posts & Telecom Press
Content preview from Python数据科学手册
第 2 章
NumPy
入门
本章和第
3
章将介绍通过
Python
有效导入、存储和操作内存数据的主要技巧。这个主题
非常广泛,因为数据集的来源与格式都十分丰富,比如文档集合、图像集合、声音片段集
合、数值数据集合,等等。这些数据虽然存在明显的异构性,但是将所有数据简单地看作
数字数组非常有助于我们理解和处理数据。
例如,可以将图像(尤其是数字图像)简单地看作二维数字数组,这些数字数组代表各区
域的像素值;声音片段可以看作时间和强度的一维数组;文本也可以通过各种方式转换成
数值表示,一种可能的转换是用二进制数表示特定单词或单词对出现的频率。不管数据是
何种形式,第一步都是将这些数据转换成数值数组形式的可分析数据(
5.4
节将更详细地
介绍一些实现这种数据转换的示例)。
正因如此,有效地存储和操作数值数组是数据科学中绝对的基础过程。我们将介绍
Python
中专门用来处理这些数值数组的工具:
NumPy
包和
Pandas
包(将在第
3
章介绍)。
本章将详细介绍
NumPy
。
NumPy
(
Numerical Python
的简称)提供了高效存储和操作密集
数据缓存的接口。在某些方面,
NumPy
数组与
Python
内置的列表类型非常相似。但是随
着数组在维度上变大,
NumPy
数组提供了更加高效的存储和数据操作。
NumPy
数组几乎
是整个
Python
数据科学工具生态系统的核心。因此,不管你对数据科学的哪个方面感兴
趣,花点时间学习如何有效地使用
NumPy
都是非常值得的。
如果你听从前言给出的建议安装了
Anaconda
,那么你已经安装好
NumPy ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

流畅的Python

流畅的Python

Luciano Ramalho
Python数据分析基础

Python数据分析基础

Clinton W. Brownley
Python数据处理

Python数据处理

Jacqueline Kazil, Katharine Jarmul

Publisher Resources

ISBN: 9787115475893