Pandas 中文参考指南

User Guide

用户指南按主题领域涵盖了所有 pandas。每个子部分都介绍了一个主题(例如“处理缺失数据”),并讨论 pandas 如何以许多示例来处理问题。

The User Guide covers all of pandas by topic area. Each of the subsections introduces a topic (such as “working with missing data”), and discusses how pandas approaches the problem, with many examples throughout.

对 pandas 一无所知的用户应从 10 minutes to pandas 开始。

Users brand-new to pandas should start with 10 minutes to pandas.

有关 pandas 基础知识的高级摘要,请参见 Intro to data structuresEssential basic functionality

For a high level summary of the pandas fundamentals, see Intro to data structures and Essential basic functionality.

可在 API reference 中获取有关任何特定方法的更多信息。

Further information on any specific method can be obtained in the API reference.

How to read these guides

在这些指南中,你将在代码块中看到输入代码,例如:

In these guides you will see input code inside code blocks such as:

import pandas as pd
pd.DataFrame({'A': [1, 2, 3]})

或:

or:

In [1]: import pandas as pd

In [2]: pd.DataFrame({'A': [1, 2, 3]})
Out[2]:
   A
0  1
1  2
2  3

第一个块是标准 python 输入,而在第二个块中 In [1]: 表示输入在 notebook 内。在 Jupyter Notebooks 中,将打印最后一行并内联显示图表。

The first block is a standard python input, while in the second the In [1]: indicates the input is inside a notebook. In Jupyter Notebooks the last line is printed and plots are shown inline.

例如:

For example:

In [3]: a = 1

In [4]: a
Out[4]: 1

等效于:

is equivalent to:

a = 1
print(a)

Guides