code: def enrichment_from_evidence(dfe, modification="Phospho (STY)"):
      
  
      dfe = dfe.reset_index().set_index('Experiment')
  
      dfe['Modifications'] = np.array([modification in m for m in dfe['Modifications']])
      dfe = dfe.set_index('Modifications', append=True)
  
      dfes = dfe.sum(axis=0, level=[0,1]).T
  
      columns = dfes.sum(axis=1, level=0).columns
  
      total = dfes.sum(axis=1, level=0).values.flatten() # Total values
      modified = dfes.iloc[0, dfes.columns.get_level_values('Modifications').values ].values # Modified
      enrichment = modified / total
  
      return pd.DataFrame([enrichment], columns=columns, index=['% Enrichment'])
docs: Calculate relative enrichment of peptide modifications from evidence.txt.
  
      Taking a modifiedsitepeptides ``DataFrame`` returns the relative enrichment of the specified
      modification in the table.
  
      The returned data columns are generated from the input data columns.
  
      :param df: Pandas ``DataFrame`` of evidence
      :return: Pandas ``DataFrame`` of percentage modifications in the supplied data.