Writes data from a Dataset object to JSONstat or Pandas Dataframe.
        Args:
            output(string): can accept 'jsonstat' or 'dataframe'

        Returns:
            Serialized JSONstat or a Pandas Dataframe,depending on the \
            'output' parameter.

def write(self, output='jsonstat'):
        """Writes data from a Dataset object to JSONstat or Pandas Dataframe.
        Args:
            output(string): can accept 'jsonstat' or 'dataframe'

        Returns:
            Serialized JSONstat or a Pandas Dataframe,depending on the \
            'output' parameter.

        """

        if output == 'jsonstat':
            return json.dumps(OrderedDict(self), cls=NumpyEncoder)
        elif output == 'dataframe':
            return get_dim_label(self, self['label'], 'dimension')
        else:
            raise ValueError("Allowed arguments are 'jsonstat' or 'dataframe'")