def sparkify(series):
series = [ float(i) for i in series ]<EOL>minimum = min(series)<EOL>maximum = max(series)<EOL>data_range = maximum - minimum<EOL>if data_range == <NUM_LIT:0.0>:<EOL><INDENT>return u'<STR_LIT>'.join([ spark_chars[<NUM_LIT:0>] for i in series ])<EOL><DEDENT>coefficient = (len(spark_chars) - <NUM_LIT:1.0>) / data_range<EOL>return u'<STR_LIT>'.join([<EOL>spark_chars[<EOL>int(round((x - minimum) * coefficient))<EOL>] for x in series<EOL>])<EOL>
u"""Converts <series> to a sparkline string.

    Example:
    >>> sparkify([ 0.5, 1.2, 3.5, 7.3, 8.0, 12.5, 13.2, 15.0, 14.2, 11.8, 6.1,
    ... 1.9 ])
    u'▁▁▂▄▅▇▇██▆▄▂'

    >>> sparkify([1, 1, -2, 3, -5, 8, -13])
    u'▆▆▅▆▄█▁'

    Raises ValueError if input data cannot be converted to float.
    Raises TypeError if series is not an iterable.