def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def dframe(cls, dataset, dimensions):
        if dimensions:
            return dataset.data[dimensions].to_pandas()
        else:
            return dataset.data.to_pandas()