code: def _frequent_localizations(df):
      
      max_count = int(df['DP AA count'].max())
      max_aa = set(df[df['DP AA count'] == max_count]['DP AA'].unique())
      result = {'DP AA max count' : max_count}
      if 'nterm' in max_aa:
          result['DP AA'] = 'nterm'
      else:
          result['DP AA'] = ';'.join(sorted(max_aa))
      return pd.Series(result)
docs: returns the most frequent localization for any dependent peptide.
      In case of ties, preference is given to n-terminal modification which are
      biologically more likely to occur
      :param df: allPeptides.txt table.