def unicodeify(formula):
    """
    Generates a formula with unicode subscripts, e.g. Fe2O3 is transformed
    to Fe₂O₃. Does not support formulae with decimal points.

    :param formula:
    :return:
    """

    if '.' in formula:
        raise ValueError('No unicode character exists for subscript period.')

    subscript_unicode_map = {0: '₀', 1: '₁', 2: '₂', 3: '₃', 4: '₄',
                             5: '₅', 6: '₆', 7: '₇', 8: '₈', 9: '₉'}

    for original_subscript, subscript_unicode in subscript_unicode_map.items():
        formula = formula.replace(str(original_subscript), subscript_unicode)

    return formula
Generates a formula with unicode subscripts, e.g. Fe2O3 is transformed
    to Fe₂O₃. Does not support formulae with decimal points.

    :param formula:
    :return: