import re


def clean_string(s: str) -> str:
    """
    Replace common symbols with column-name safe alternatives.

    :param s: incoming string
    :return: string
    """
    mp = {
        "<": "_lt_",
        ">": "_gt_",
        "[": "_osq_",
        "]": "_csq_",
        "(": "_op_",
        ")": "_cp_",
        ".": "_",
        " ": "_",
    }
    s = s.strip()
    s = re.sub(r"\s+", " ", s)
    for (k, v) in mp.items():
        s = s.replace(k, v)
    return s