def METHOD_NAME(df, value, loc):
    if axis == 0:
        first_mask = df.iloc[:loc]
        if replace:
            loc += 1
        second_mask = df.iloc[loc:]
    else:
        first_mask = df.iloc[:, :loc]
        if replace:
            loc += 1
        second_mask = df.iloc[:, loc:]
    return pandas.concat([first_mask, value, second_mask], axis=axis)