def _interactions_to_list_of_lists(interactions):
    """
    Transforms interactions dataframe user, item to user, [item1, item2] dataframe
    :param interactions: Interactions dataframe
    :return: Interactions dataframe format user, [item1, item2]
    """
    interactions = interactions.sort_values(by="timestamp")
    return interactions.groupby("user")["item"].apply(list)