摘要:
from pandas import Series, DataFrame import numpy as np ser = Series(np.arange(3)) print(ser) ''' 0 0 1 1 2 2 dtype: int64 ''' #print(ser[-1]) # 整数索引会 阅读全文
摘要:
frame.irow(0)改为frame.iloc[0] 阅读全文
摘要:
ser.iget_value(2)改为ser.iat[2] 阅读全文
摘要:
from pandas import Series import numpy as np data = Series(np.random.randn(10), index=[['a','a','a','b','b','b','c','c','d','d'], [1,2,3,1,2,3,1,2,2,3 阅读全文
摘要:
frame.sortlevel(0)改为 frame.sort_index(0) 阅读全文
摘要:
data.ix[['b','d']] 报错AttributeError: 'Series' object has no attribute 'ix' 改为 data.loc[['b','d']] 阅读全文