code: def from_dataframe(in_df, dtype=None):
      from ...dataframe.utils import build_empty_df
  
      if dtype is None:
          empty_pdf = build_empty_df(in_df.dtypes)
          dtype = to_numpy(empty_pdf).dtype
      op = TensorFromDataFrame(dtype=dtype, gpu=in_df.op.gpu)
      return op(in_df, order=TensorOrder.F_ORDER)
  
file_path: mars/mars/tensor/datasource/from_dataframe.py
imports: from ...None import opcodes
  from ...serialization.serializables import BoolField, KeyField
  from ..utils import to_numpy
  from ..core import TensorOrder
  from .core import TensorHasInput
label_desc: Use image node_id 1 for calling a global function with example usage: from_dataframe(in_df, dtype) and returns: op