def formalize_str(input_str, suffix=None):
    """
    Capitalize string by word and remove underscores.

    :param input_str: (str) - string to replace underscores and title
    :param suffix: (str) - suffix in string to be removed
    :return output_str: (str) - formalized string
    """
    if suffix:
        input_str = input_str.replace(suffix, '')
    output_str = input_str.replace('_', ' ').title()
    return output_str
