def to_list(dataframe, column):
    """
    Converts a Pandas dataframe to a nested list in [X, Y, grid reference or UID] format.
    :param dataframe: Pandas dataframe, data
    :param column: string, column name containing the grid reference or UID
    :return: list, nested list in [X, Y, grid reference or UID] format
    """
    return dataframe.loc[:, [0, 1, column]].values.tolist()