@pandas_udf(returnType=DoubleType())
def calculate_columns_axis(*cols: pd.Series) -> pd.Series:
    return pd.concat(cols, axis=1).mad(axis=1)
@pandas_udf(returnType=DoubleType())
def calculate_columns_axis(*cols: pd.Series) -> pd.Series:
    return pd.concat(cols, axis=1).mad(axis=1)