程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python chapter 08 data warping: aggregation, merging and reshaping

編輯:Python

In many applications , Data may be scattered in many files or databases , The form of storage is also not conducive to analysis . This chapter focuses on aggregating 、 Merge 、 Ways to reshape data .

First , I will introduce pandas Hierarchical index of , It is widely used for the above operations . then , I introduced some special data operations in depth . In the 14 Chapter , You can see many applications of these tools .

8.1 Hierarchical index

Hierarchical index (hierarchical indexing) yes pandas An important function of , It allows you to have multiple... On one axis ( More than two ) Index level . To be more abstract , It enables you to process high-dimensional data in low-dimensional form . Let's start with a simple example : Create a Series, And use a list composed of lists or arrays as an index :

In [9]: data = pd.Series(np.random.randn(9)

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved