select k.SAL from (select SAL,rownum rn from (select SAL from SCOTT.EMP where MGR = 7698 order by SAL desc)) kwhere rn = 2 rownum就是在查询结果中新增了一行num SAL RN--------- ---------- 1600.00 1 1500.00 2 1250.00 3 1250.00 4 950.00 5
This would allow chaining operations like: pd.read_csv('imdb.txt') .sort(columns='year') .filter(lambda x: x['year']>1990) # <---this is missing in Pandas .to_csv('filtered.csv') For current alternatives see: http://stackoverflow.com/questions/11869
Series索引的工作方式类似于NumPy数组的索引,不过Series的索引值不只是整数,如: import numpy as np import pandas as pd from pandas import Series,DataFrame obj=Series(np.arange(4),index=['a','b','c','d']) obj=Series(np.arange(4),index=['a','b','c','d']) obj Out[10]: a 0 b 1 c 2 d 3
import numpy as np import pandas as pd This section will walk you(引导你) through the fundamental(基本的) mechanics(方法) of interacting(交互) with the data contained in a Series or DataFrame. -> (引导你去了解基本的数据交互, 通过Series, DataFrame). In the chapters to come, w
本节介绍Series和DataFrame中的数据的基本手段 重新索引 pandas对象的一个重要方法就是reindex,作用是创建一个适应新索引的新对象 ''' Created on 2016-8-10 @author: xuzhengzhu ''' ''' Created on 2016-8-10 @author: xuzhengzhu ''' from pandas import * print "--------------obj result:-----------------"