def encode_csv(s, sep=','):
    """
    Returns a string, escaping it if necessary for CSV encoding
    :param s: original string
    :param sep: separator to be used, defaults to ','
    :return: original of quote-enclosed string
    """
    if s.find(sep) >= 0:
        return '"{}"'.format(s)
    else:
        return s
