def icevol_corr_prep(record, agelabel, age_in_ky):
    """
    Prepare ``record`` for the ice volume correction.

    Converts all numbers to actual number dtypes, converts
    Age to integer years and sets it as index.

    Parameters
    ----------
    record : pandas DataFrame
        A pandas DataFrame containing the data to prepare.
    agelabel : string
        The column label for the age data.
    age_in_ky : Boolean
        If True, ages will be converted from kyrs to years.

    """
    record = record.convert_objects(convert_numeric=True,
                                    convert_dates=False,
                                    convert_timedeltas=False,
                                    copy=False)

    if age_in_ky:
        record[agelabel] = record[agelabel] * 1000

    record[agelabel] = record[agelabel] // 1

    record.set_index(agelabel, inplace=True)

    return record