def byte_adaptor(fbuffer):
    if six.PY3:
        strings = fbuffer.read().decode('utf-8')
        fbuffer = six.StringIO(strings)
        return fbuffer
    else:
        return fbuffer
provides py3 compatibility by converting byte based
dataset/ETHPy150Open vsjha18/nsetools/utils.py/byte_adaptor