摘要:
from pandas import DataFrame, Series import numpy as np df = DataFrame([[1.4,np.nan],[7.1,-4.5], [np.nan,np.nan],[0.75,-1.3]], index=['a','b','c','d'] 阅读全文
摘要:
重新索引 from pandas import Series,DataFrame # Series重新索引 obj = Series([4.5,7.2,-5.3,3.6],index=['d','b','a','c']) print(obj) ''' d 4.5 b 7.2 a -5.3 c 3.6 阅读全文