docstr: Returns the data of a Dataset as a dataframe avoiding copying
  if it already a dataframe type.
docstr_tok: ["Returns","the","data","of","a","Dataset","as","a","dataframe","avoiding","copying","if","it","already","a","dataframe","type","."]
code: def as_dframe(cls, dataset):
      """
      Returns the data of a Dataset as a dataframe avoiding copying
      if it already a dataframe type.
      """
      if issubclass(dataset.interface, PandasInterface):
          return dataset.data
      else:
          return dataset.dframe()
  
imports: import numpy
  import pandas
  from packaging.version import Version
  from pandas.api.types import is_numeric_dtype
  from ..None import util
  from ..dimension import Dimension, dimension_name
  from ..element import Element
  from ..ndmapping import NdMapping, item_check, sorted_context
  from .interface import DataError, Interface
  from .util import finite_range
label_desc: Use image node_id 20 for calling the PandasInterface obj's underlying member method code with example usage: obj.as_dframe(cls, dataset) and returns: dataset, dataset