def Lobify (data,group,formants):
    """
    Applies Lobanov (z-score) normalization to vowels according to a grouping variable
    Adds a column to original dataframe for each formant, with zsc prefixed to the formant name
    --
    
    Required parameters:
    
    data = dataframe containing data to transform
    
    group = string matching the name of column to normalize by, for example "speaker" 
    
    formants = list of strings matching the names of columns to be normalized
    
    """
    zscore = lambda x: (x - x.mean()) / x.std()
    for formant in formants: 
        name = str("zsc"+formant)
        col = data.groupby([group])[formant].transform(zscore)
        data.insert(len(data.columns),name,col)
    return data