pandas.pivot()

pandas.pivot

pandas.pivot(index, columns, values) [source]

Produce ‘pivot’ table based on 3 columns of this DataFrame. Uses unique values from index / columns and fills with values.

Parameters:

index : ndarray

Labels to use to make new frame’s index

columns : ndarray

Labels to use to make new frame’s columns

values : ndarray

Values to use for populating new frame’s values

Returns:

DataFrame

Notes

Obviously, all 3 of the input arguments must have the same length

© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
http://pandas.pydata.org/pandas-docs/version/0.19.2/generated/pandas.pivot.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部