Tutorials

This is a guide to many pandas tutorials, geared mainly for new users.

Internal Guides

pandas’ own 10 Minutes to pandas.

More complex recipes are in the Cookbook.

A handy pandas cheat sheet.

pandas Cookbook

The goal of this 2015 cookbook (by Julia Evans) is to give you some concrete examples for getting started with pandas. 这些是现实世界数据的例子,以及所有需要的错误和怪异。

Here are links to the v0.2 release. For an up-to-date table of contents, see the pandas-cookbook GitHub repository. To run the examples in this tutorial, you’ll need to clone the GitHub repository and get IPython Notebook running. See How to use this cookbook.

  • A quick tour of the IPython Notebook: 展示IPython令人敬畏的标签完成和魔术功能。
  • Chapter 1: 将数据读入pandas几乎是最简单的事情。 即使编码错误!
  • Chapter 2: 如何从pandas dataframe中选择数据并不完全明显。 在这里我们解释基础知识(如何采取切片和获取列)
  • Chapter 3: 在这里,我们进入严肃的切片和切割,并学习如何以复杂的方式过滤数据帧,非常快。
  • Chapter 4: Groupby / aggregate是我最喜欢的关于pandas的事情,我一直都在使用它。 You should probably read this.
  • Chapter 5: Here you get to find out if it’s cold in Montreal in the winter (spoiler: yes). Web scraping with pandas is fun! Here we combine dataframes.
  • Chapter 6: Strings with pandas are great. It has all these vectorized string operations and they’re the best. We will turn a bunch of strings containing “Snow” into vectors of numbers in a trice.
  • Chapter 7: 清理凌乱的数据绝不是一种乐趣,但是使用pandas会更容易。
  • Chapter 8: 解析Unix时间戳起初很混乱,但事实证明它非常简单。
  • Chapter 9: 从SQL数据库中读取数据。

Lessons for new pandas users

For more resources, please visit the main repository.

  • 01 - Lesson: - 导入库 - 创建数据集 - 创建数据框 - 从CSV读取 - 导出为CSV - 查找最大值 - 绘制数据
  • 02 - Lesson: - 从TXT读取 - 导出到TXT - 选择顶部/底部记录 - 描述性统计 - 分组/排序数据
  • 03 - Lesson: - 创建函数 - 从EXCEL读取 - 导出到EXCEL - 异常值 - Lambda函数 - 切片和骰子数据
  • 04 - Lesson: - 添加/删除列 - 索引操作
  • 05 - Lesson: - Stack/Unstack/Transpose functions
  • 06 - Lesson: - GroupBy功能
  • 07 - Lesson: - 计算异常值的方法
  • 08 - Lesson: - 从Microsoft SQL数据库中读取
  • 09 - Lesson: - 导出为CSV / EXCEL / TXT
  • 10 - Lesson: - 在不同种类的格式之间转换
  • 11 - Lesson: - 结合各种来源的数据

Python的实用数据分析

指南是使用Python数据生态系统和有趣的开放数据集对数据分析过程的全面介绍。 有四个部分涵盖选定的主题如下:

新用户的练习

通过真实的数据集和练习练习您的技能。 For more resources, please visit the main repository.

Modern pandas

Tutorial series written in 2016 by Tom Augspurger. The source may be found in the GitHub repository TomAugspurger/effective-pandas.

带有pandas,vincent和xlsxwriter的Excel图表

Scroll To Top