# Pandas official document: HTTP: //pandas.pydata.org/pandas-docs/stable/ # - * - author Yangami - * - Import PANDAS AS pd Import numpy AS NP
First, the basic type
Construction of series with lists, arrays and dictionaries
List = LST ( ' abcedfg ' ) # listing ARR = np.arange (. 7) # Array # construction method Ser1 = pd.Series (LST) SER2 = pd.Series (ARR) # an one dimension sequential series automatically add an index Print ( Ser1) Print (SER2)
# Construction dictionary transfected Series DIC = { ' timely ' : ' Sung ' , ' leopard head ' : ' Lin ' , ' Monk ' : ' Lu ' , ' Joe ' : ' Yanqing ' } Ser3 = pd.Series (DIC) ser3
dict (ZIP (LST, ARR)) # Construction dictionary transfected with two sequences Series myDict = dict (ZIP (LST, ARR)) # dictionary Ser3 = pd.Series (myDict) Ser3
# Series np.array has many properties ser1_ = SER2 +. 1 Print (ser1_) ser3.shape
There are statistics to document people say Python (2) _Pandas Getting a complete code and examples of their data