code: def _merge(dts):
      
      df = pd.concat(dts)
  
      ma = df.pivot(index='isomir', columns='sample', values='counts')
      ma_mirna = ma
      ma = ma.fillna(0)
      ma_mirna['mirna'] = [m.split(":")[0] for m in ma.index.values]
      ma_mirna = ma_mirna.groupby(['mirna']).sum()
      ma_mirna = ma_mirna.fillna(0)
      return ma, ma_mirna
docs: merge multiple samples in one matrix