def stack_to_hgc(df, index=['LocationID', 'Datetime', 'SampleID']):
    """
    Pivot stacked dataframe to wide format used by HGC.

    Parameters
    ----------
    df : Dataframe
    index : list
        columns to use as index when pivoting data
        Default = ['LocationID', 'Datetime', 'SampleID']

    Return
    ------
    Dataframe

    """
    df2 = df.pivot_table(index=list(set(df.columns) & set(index)),
                         columns='Feature', values='Value', aggfunc='first')
    return df2