Returns a payload of metadata and data

def get_single_payload(self, query_obj):
        """Returns a payload of metadata and data"""
        payload = self.get_df_payload(query_obj)
        df = payload.get('df')
        status = payload.get('status')
        if status != utils.QueryStatus.FAILED:
            if df is not None and df.empty:
                payload['error'] = 'No data'
            else:
                payload['data'] = self.get_data(df)
        if 'df' in payload:
            del payload['df']
        return payload