Python 将Excel文件从Github存储库导入pandas

Python 将Excel文件从Github存储库导入pandas,python,pandas,github,import,Python,Pandas,Github,Import,在我使用以下源代码将我的私有Github存储库中的Excel文件导出到Pandas数据框的过程中: username= 'xxx' token = 'yyyy' github_session = requests.Session() github_session.auth = (username, token) url = 'correct path to raw file' export = requests.get(url).content df = pd.read_excel(io.S

在我使用以下源代码将我的私有Github存储库中的Excel文件导出到Pandas数据框的过程中:

username= 'xxx'
token = 'yyyy'
github_session = requests.Session()
github_session.auth = (username, token)

url = 'correct path to raw file'
export = requests.get(url).content

df = pd.read_excel(io.StringIO(export.decode('utf-8')))
我在运行上述区块的最后一行时遇到错误:

TypeError: unsupported operand type(s) for <<: 'str' and 'int'

TypeError:Excel不支持的操作数类型是二进制文件格式。请改用
io.BytesIO(导出)

谢谢您的评论
pd.read\u excel(io.BytesIO(export.decode('utf-8'))
返回类型错误如下:类型错误:需要类似字节的对象,而不是
pd.read\u excel(io.BytesIO(export))
返回以下错误:xlrd.biffh.XLRDError:不支持的格式,或损坏的文件:预期的BOF记录;找到b'\n\n\n\n\n不使用
。解码
;解码将其转换为字符串格式