def num2str(element, decimal_sep='.'):
    """
    A helper function that converts strings to numbers if possible
    and replaces the float decimal separator with the given value
    """
    if isinstance(element, float):
        return str(element).replace('.', decimal_sep)
    return str(element)