code: def read_and_split(
      data_input_path,
      sparse_int_features,
      sparse_string_features,
      dense_features,
  ):
      header_names = [
          "user_id",
          "article_id",
          "expo_time",
          "net_status",
          "flush_nums",
          "exop_position",
          "click",
          "duration",
          "device",
          "os",
          "province",
          "city",
          "age",
          "gender",
          "ctime",
          "img_num",
          "cat_1",
          "cat_2",
      ]
      if data_input_path.endswith("csv"):
          tbl = FeatureTable.read_csv(
              data_input_path, header=False, names=header_names
          )
      else:
          tbl = FeatureTable.read_parquet(data_input_path)
  
      print("The number of total data: {}".format(tbl.size()))
  
      tbl = tbl.cast(sparse_int_features, "string")
      tbl = tbl.cast(dense_features, "string")
  
      # fill absence data
      for feature in sparse_int_features + sparse_string_features:
          tbl = tbl.fillna("", feature)
      tbl = tbl.fillna("0.0", "img_num")
  
      tbl = tbl.apply("img_num", "img_num", transform_img_num, "float")
      tbl = tbl.apply("cat_2", "cat_2", transform_cat_2, "string")
  
      train_tbl = FeatureTable(
          tbl.df[tbl.df["expo_time"] < "2021-07-06"]
      )
      valid_tbl = FeatureTable(
          tbl.df[tbl.df["expo_time"] >= "2021-07-06"]
      )
      print("The number of train data: {}".format(train_tbl.size()))
      print("The number of test data: {}".format(valid_tbl.size()))
      return train_tbl, valid_tbl
  
file_path: BigDL/python/friesian/example/multi_task/data_processing.py
imports: import os
  from argparse import ArgumentParser
  from bigdl.dllib.utils.log4Error import invalidInputError
  from bigdl.orca import init_orca_context, stop_orca_context
  from bigdl.friesian.feature import FeatureTable
label_desc: Use image node_id 3 for calling a global function with example usage: read_and_split(data_input_path, sparse_int_features, sparse_string_features, dense_features) and returns: train_tbl,  valid_tbl