code: def concat_with_pipe(x, cols=None):
      
      cols = cols or x.index
      return '|'.join([x[i] for i in cols if x[i] not in [None, np.nan]])
docs: Concatenate a `pd.Series` separated by `|`, drop `None` or `np.nan`