code: def concat(x, y, axis=0):
      
      if all([isinstance(df, (pd.DataFrame, pd.Series)) for df in [x, y]]):
          return pd.concat([x, y], axis=axis)
      else:
          if axis == 0:
              return np.concatenate([x, y])
          else:
              return np.column_stack([x, y])
docs: Concatenate a sequence of pandas or numpy objects into one entity.