class_docstr: A collection of data which can be pre-processed in parallel on Spark.
class_docstr_tok: ["A","collection","of","data","which","can","be","pre-processed","in","parallel","on","Spark","."]
docstr: The api is used to merge/convert one or multiple feature columns into a numpy array,
  merge/convert one or multiple label columns into a numpy array.
  
  :param featureCols: a list of feature columns.
  :param labelCols: a list of label columns.
  :return: SparkXShards of dictionary, key is assembled feature numpy array, value is
   assembled label numpy array
  
  eg:
  shards: SparkXShards of pandas data frame with 9 cols ['f1', 'f2', 'f3', 'f4', 'f5', 'f6',
   'f7', 'f8', 'lable']
      f1   f2  f3  f4   f5    f6     f7  f8  label
       6  148  72  35    0  33.6  0.627  50      1
       1   85  66  29    0  26.6  0.351  31      0
       8  183  64   0    0  23.3  0.672  32      1
       1   89  66  23   94  28.1  0.167  21      0
       0  137  40  35  168  43.1  2.288  33      1
  
  transform_shards =
    shards.assembleFeatureLabelCols(featureCols=['f1', 'f2', 'f3', 'f4', 'f5', 'f6',
     'f7', 'f8'], labelCols=['label'])
  
  transform_shards will be SparkXShards of dictionary. key will be a stacked numpy array
  (stack feature columns), value will be a numpy array
  {'x': array([[  6.   , 148.   ,  72.   , ...,  33.6  ,   0.627,  50.   ],
     [  1.   ,  85.   ,  66.   , ...,  26.6  ,   0.351,  31.   ],
     [  8.   , 183.   ,  64.   , ...,  23.3  ,   0.672,  32.   ],
     [  1.   , 89.   ,  66.   , ...,  28.1  ,   0.167,  21.   ],
     [  0.   , 137.   ,  40.   , ...,  43.1  ,  2.288, 33.   ]]),
   'y': array([[1],
     [0],
     [1],
     [0],
     [1]
docstr_tok: ["The","api","is","used","to","merge\/convert","one","or","multiple","feature","columns","into","a","numpy","array",",","merge\/convert","one","or","multiple","label","columns","into","a","numpy","array",".",":","param","featureCols",":","a","list","of","feature","columns",".",":","param","labelCols",":","a","list","of","label","columns",".",":","return",":","SparkXShards","of","dictionary",",","key","is","assembled","feature","numpy","array",",","value","is","assembled","label","numpy","array","eg",":","shards",":","SparkXShards","of","pandas","data","frame","with","9","cols","[","'f1","'",",","'f2","'",",","'f3","'",",","'f4","'",",","'f5","'",",","'f6","'",",","'f7","'",",","'f8","'",",","'lable","'","]","f1","f2","f3","f4","f5","f6","f7","f8","label","6","148","72","35","0","33.6","0.627","50","1","1","85","66","29","0","26.6","0.351","31","0","8","183","64","0","0","23.3","0.672","32","1","1","89","66","23","94","28.1","0.167","21","0","0","137","40","35","168","43.1","2.288","33","1","transform_shards","=","shards.assembleFeatureLabelCols","(","featureCols=","[","'f1","'",",","'f2","'",",","'f3","'",",","'f4","'",",","'f5","'",",","'f6","'",",","'f7","'",",","'f8","'","]",",","labelCols=","[","'label","'","]",")","transform_shards","will","be","SparkXShards","of","dictionary",".","key","will","be","a","stacked","numpy","array","(","stack","feature","columns",")",",","value","will","be","a","numpy","array","{","'","x","'",":","array","(","[","[","6.",",","148.",",","72.",",","...",",","33.6",",","0.627",",","50",".","]",",","[","1.",",","85.",",","66.",",","...",",","26.6",",","0.351",",","31",".","]",",","[","8.",",","183.",",","64.",",","...",",","23.3",",","0.672",",","32",".","]",",","[","1.",",","89.",",","66.",",","...",",","28.1",",","0.167",",","21",".","]",",","[","0.",",","137.",",","40.",",","...",",","43.1",",","2.288",",","33",".","]","]",")",",","'","y","'",":","array","(","[","[","1","]",",","[","0","]",",","[","1","]",",","[","0","]",",","[","1","]"]
code: def assembleFeatureLabelCols(
      self,
      featureCols: List[Union[str, "Column"]],
      labelCols: List[Union[str, "Column"]],
  ) -> "SparkXShards":
      """
      The api is used to merge/convert one or multiple feature columns into a numpy array,
      merge/convert one or multiple label columns into a numpy array.
  
      :param featureCols: a list of feature columns.
      :param labelCols: a list of label columns.
      :return: SparkXShards of dictionary, key is assembled feature numpy array, value is
       assembled label numpy array
  
      eg:
      shards: SparkXShards of pandas data frame with 9 cols ['f1', 'f2', 'f3', 'f4', 'f5', 'f6',
       'f7', 'f8', 'lable']
          f1   f2  f3  f4   f5    f6     f7  f8  label
           6  148  72  35    0  33.6  0.627  50      1
           1   85  66  29    0  26.6  0.351  31      0
           8  183  64   0    0  23.3  0.672  32      1
           1   89  66  23   94  28.1  0.167  21      0
           0  137  40  35  168  43.1  2.288  33      1
  
      transform_shards =
        shards.assembleFeatureLabelCols(featureCols=['f1', 'f2', 'f3', 'f4', 'f5', 'f6',
         'f7', 'f8'], labelCols=['label'])
  
      transform_shards will be SparkXShards of dictionary. key will be a stacked numpy array
      (stack feature columns), value will be a numpy array
      {'x': array([[  6.   , 148.   ,  72.   , ...,  33.6  ,   0.627,  50.   ],
         [  1.   ,  85.   ,  66.   , ...,  26.6  ,   0.351,  31.   ],
         [  8.   , 183.   ,  64.   , ...,  23.3  ,   0.672,  32.   ],
         [  1.   , 89.   ,  66.   , ...,  28.1  ,   0.167,  21.   ],
         [  0.   , 137.   ,  40.   , ...,  43.1  ,  2.288, 33.   ]]),
       'y': array([[1],
         [0],
         [1],
         [0],
         [1]
      """
      if self._get_class_name() != "pandas.core.frame.DataFrame":
          invalidInputError(
              False,
              "Currently only support assembleFeatureLabelCols() on"
              " XShards of Pandas DataFrame",
          )
  
      def to_shard_dict(df):
          featureLists = [
              df[feature_col].to_numpy() for feature_col in featureCols
          ]
          labelLists = [
              df[label_col].to_numpy() for label_col in labelCols
          ]
          result = {
              "x": np.stack(featureLists, axis=1),
              "y": np.stack(labelLists, axis=1),
          }
          return result
  
      invalidInputError(
          type(featureCols) == list, "expect featureCols is a list"
      )
      invalidInputError(
          type(labelCols) == list, "expect labelCols is a list"
      )
      transformed_shard = self.transform_shard(to_shard_dict)
      return transformed_shard
  
imports: from py4j.protocol import Py4JError
  from bigdl.orca.data.utils import *
  from bigdl.orca import OrcaContext
  from bigdl.dllib.utils.common import get_node_and_core_number, get_spark_sql_context, get_spark_context
  from bigdl.dllib.utils import nest
  from bigdl.dllib.utils.log4Error import invalidInputError
  import numpy
  from typing import TYPE_CHECKING, Any
  from typing import Callable, Dict, List, Optional, Tuple, Union
label_desc: Use image node_id 23 for calling the SparkXShards obj's underlying member method code with example usage: obj.assembleFeatureLabelCols(featureCols, labelCols) and returns: transformed_shard, result