code: def unite_dataset(dataset, basecolumn=0):
      
      ndata = [None] * len(dataset[0])
      for pdata in dataset:
          # select basecolumn
          bnx = ndata[basecolumn]
          bpx = pdata[basecolumn]
          if bnx is not None and bnx.ndim >= 2:
              bnx = bnx[:,-1]
          if bpx is not None and bpx.ndim >= 2:
              bpx = bpx[:,-1]
          # calculate min and max of this and final data
          if bnx is not None and len(bnx) != len(bpx):
              # the number of samples is different, so regulation is required
              xmin = max(np.min(bnx), np.min(bpx))
              xmax = min(np.max(bnx), np.max(bpx))
              # slice the data
              nindex = np.where((bnx>xmin) & (bnx<xmax))
              pindex = np.where((bpx>xmin) & (bpx<xmax))
          else:
              nindex = None
              pindex = None
          for i, (nx, px) in enumerate(itertools.izip(ndata, pdata)):
              if nindex:
                  nx = nx[nindex]
              if pindex:
                  px = px[pindex]
              ndata[i] = px if nx is None else np.c_[nx, px]
      return [ndata]
docs: Unite dataset into a single data
  
      Parameters
      ----------
      dataset : list of ndarray
          A data list of a column list of a numpy arrays
      basecolumn : integer, optional
          An index of base column.
          All data will be trimmed based on the order of this column when the
          number of samples are different among the dataset
  
      Returns
      -------
      list of numpy array
          A column list of a numpy array