code: def pivot_samples(self, values, index="ID_REF"):
          
          data = []
          for gsm in self.gsms.values():
              tmp_data = gsm.table.copy()
              tmp_data["name"] = gsm.name
              data.append(tmp_data)
          ndf = concat(data).pivot(index=index, values=values, columns="name")
          return ndf
docs: Pivot samples by specified column.
  
          Construct a table in which columns (names) are the samples, index
          is a specified column eg. ID_REF and values in the columns are of one
          specified type.
  
          Args:
              values (:obj:`str`): Column name present in all GSMs.
              index (:obj:`str`, optional): Column name that will become an index in
                  pivoted table. Defaults to "ID_REF".
  
          Returns:
              :obj:`pandas.DataFrame`: Pivoted data