Short video learning - 3, pandas simple use of pivot_table

Content Today

# 1 What is pivot_table? # Can be understood as a PivotTable 
# 2 Why pivot_table? # To transform data aggregation statistics 
# 3 how to use pivot_table? # See Case

Brief introduction

# PivotTable pivot_table () is a very powerful summary operations functions. Pivot tables in SQL statements and excel is also very common.

Parameter Description

. 1 the pivot_table ( 
    Data,                 # data handler 
    values = None,          # see Case 
    index = None,          # see Case 
    Columns = None,          # see Case 
    aggfunc = ' Mean ' ,         # polymerization process 
    fill_value = None,      # filled 
    dropna = True,         # default delete blank 
    margins = False,          # Subtotal 
    margins_name = ' All ' )     # Subtotal name

Small Case

# 1 pandas prepared using a simple PivotTable

If your browser can not display the video below, you can click here to watch a short video Youku

 

Guess you like

Origin www.cnblogs.com/lich1x/p/11783976.html