本问主要写根据索引或者值对series和dataframe进行排序的实例讲解
代码:
#coding=utf-8
import pandas as pd
import numpy as np
#以下实现排序功能。
series=pd.Series([3,4,1,6],index=['b','a','d','c'])
frame=pd.DataFrame([[2,4,1,5],[3,1,4,5],[5,1,4,2]],columns=['b','a','d','c'],index=['one','two','three'])
print frame
print series
print 'se