def convert_all_elements_tuple(input_df):
    """
    If all elements are lists or numpy arrays, these are not hashable.
    So we can convert to tuples, in order to be able to perform groupbys.
    """
    return input_df.applymap(tuple)
