class_docstr: A Table Dataset, load data from a give csv path, or transform FATE DTable
  
  Parameters
  ----------
  label_col str, name of label column in csv, if None, will automatically take 'y' or 'label' or 'target' as label
  match_id_col str, name of match id column in csv, if None, will automatically take 'id' or 'sid' as match id
  sample_id_col str, name of sample id column in csv, if None, will automatically generate sample id
  feature_dtype str, dtype of features, available: 'long', 'int', 'float', 'double'
  label_dtype str, dtype of label, available: 'long', 'int', 'float', 'double'
  label_shape tuple or list, shape of label, if None, will automatically infer from data
  flatten_label bool, whether to flatten label, if True, will flatten label to 1-d array
  to_tensor bool, whether to transform data to pytorch tensor, if True, will transform data to tensor
  return_dict bool, whether to return a dict in the format of {'x': xxx, 'label': xxx} if True, will return a dict, else will return a tuple
class_docstr_tok: ["A","Table","Dataset",",","load","data","from","a","give","csv","path",",","or","transform","FATE","DTable","Parameters","--","--","--","--","--","label_col","str",",","name","of","label","column","in","csv",",","if","None",",","will","automatically","take","'","y","'","or","'label","'","or","'target","'","as","label","match_id_col","str",",","name","of","match","id","column","in","csv",",","if","None",",","will","automatically","take","'id","'","or","'sid","'","as","match","id","sample_id_col","str",",","name","of","sample","id","column","in","csv",",","if","None",",","will","automatically","generate","sample","id","feature_dtype","str",",","dtype","of","features",",","available",":","'long","'",",","'int","'",",","'float","'",",","'double'","label_dtype","str",",","dtype","of","label",",","available",":","'long","'",",","'int","'",",","'float","'",",","'double'","label_shape","tuple","or","list",",","shape","of","label",",","if","None",",","will","automatically","infer","from","data","flatten_label","bool",",","whether","to","flatten","label",",","if","True",",","will","flatten","label","to","1-d","array","to_tensor","bool",",","whether","to","transform","data","to","pytorch","tensor",",","if","True",",","will","transform","data","to","tensor","return_dict","bool",",","whether","to","return","a","dict","in","the","format","of","{","'","x","'",":","xxx",",","'label","'",":","xxx","}","if","True",",","will","return","a","dict",",","else","will","return","a","tuple"]
code: def __init__(
      self,
      label_col=None,
      match_id_col=None,
      sample_id_col=None,
      feature_dtype="float",
      label_dtype="float",
      label_shape=None,
      flatten_label=False,
      to_tensor=True,
      return_dict=False,
  ):
      super(TableDataset, self).__init__()
      self.features: np.ndarray = None
      self.label: np.ndarray = None
      self.sample_weights: np.ndarray = None
      self.origin_table: pd.DataFrame = pd.DataFrame()
      self.label_col = label_col
      self.match_id_col = match_id_col
      self.sample_id_col = sample_id_col
      self.f_dtype = self.check_dtype(feature_dtype)
      self.l_dtype = self.check_dtype(label_dtype)
      self.to_tensor = to_tensor
      self.return_dict = return_dict
      if label_shape is not None:
          assert isinstance(label_shape, tuple) or isinstance(
              label_shape, list
          ), "label shape is {}".format(label_shape)
      self.label_shape = label_shape
      self.flatten_label = flatten_label
  
      # sample ids, match ids
      self.sample_ids = None
      self.match_ids = None
  
      if self.label_col is not None:
          assert isinstance(self.label_col, str) or isinstance(
              self.label_col, int
          ), "label columns parameter must be a str or an int"
  
file_path: FATE/python/fate/ml/nn/dataset/table.py
imports: import numpy
  import pandas
  from fate.arch.dataframe import DataFrame
  from fate.ml.nn.dataset.base import Dataset
  import logging
  import torch
label_desc: Use image node_id 1 to create a new TableDataset object from inherited base classes: Dataset with example: obj = TableDataset(label_col, match_id_col, sample_id_col, feature_dtype, label_dtype, label_shape, flatten_label, to_tensor, return_dict)