def apply_K(df, k):
    """Apply the geometric factors to the dataset and compute (apparent)
    resistivities/conductivities
    """
    if 'k' not in df.columns:
        df['k'] = k
    if 'rho_a' not in df.columns:
        df['rho_a'] = df['r'] * df['k']
    if 'sigma_a' not in df.columns:
        df['sigma_a'] = 1.0 / df['rho_a']
    if 'Zt' in df.columns:
        df['rho_a_complex'] = df['Zt'] * df['k']
    return df
