def update_df(df, dirname, filename, coverage, mean, std_dev, segmented_pixel_count):
    """
    update the coverage, mean, std_dev in a given df for a specific segmentation type (dirname)
    """
    df.loc[df['names'] == filename, f'{dirname}_coverage'] = coverage
    df.loc[df['names'] == filename, f'{dirname}_mean'] = mean
    df.loc[df['names'] == filename, f'{dirname}_std_dev'] = std_dev
    df.loc[df['names'] == filename, f'{dirname}_segmentation_count'] = segmented_pixel_count 
    return df