【发布时间】:2021-03-25 18:45:22
【问题描述】:
我努力使用以下源代码将我的私人 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'
来自 Github 存储库的 Excel 原始数据文件结合了数字和字符串记录。
【问题讨论】:
标签: python pandas github import