def calculate_thickness(df):
    """
    Assign the thickness to an existing DataFrame.

    :param df: Original DataFrame.
    :return: Dataframe with thickness column.
    """
    return df.assign(thickness=df['zf'] - df['z_in'])
