def refactor_str_column(df, str1, str2, col='file_name', inplace=False):
    """
    Takes a column in a dataframe and replaces all instances of str1 with str2

    :param pandas.DataFrame df:
    :param str col:
    :param str str1:
    :param str str2:
    :param bool inplace:
        [False]  - If True, perform the action in-place
                   Note that if this is False, it returns a Series


    :return:

    """
    str1 = str1.replace('\\', '\\\\')
    str2 = str2.replace('\\', '\\\\')

    return df[col].replace(str1, value=str2, regex=True, inplace=inplace)