def close_pct_change(self):
        '返回DataStruct.close的百分比变化'
        res = self.close.groupby(level=1).apply(lambda x: x.pct_change())
        res.name = 'close_pct_change'
        return res
def close_pct_change ( self ) : res = self . close . groupby ( level = 1 ) . apply ( lambda x : x . pct_change ( ) ) res . name = 'close_pct_change' return res
返回DataStruct.close的百分比变化