def to_utf8(s):
    if six.PY2:
        if isinstance(s, str):
            return s
        elif isinstance(s, unicode):
            return s.encode('utf-8')
        elif isinstance(s, (list, tuple, set)):
            return [to_utf8(v) for v in s]
        else:
            return s
    else:
        return s
Forward fill the values
dataset/ETHPy150Open lins05/slackbot/slackbot/utils.py/to_utf8--crossover with--dataset/ETHPy150Open pydata/pandas/pandas/core/groupby.py/GroupBy.pad