转换DataStruct为json

def to_json(self):
        """
        转换DataStruct为json
        """
        
        data = self.data
        if self.type[-3:] != 'min':
            data = self.data.assign(datetime= self.datetime)
        return QA_util_to_json_from_pandas(data.reset_index())