gpt4 book ai didi

python - 如何将 4 个多索引级别的行层次结构从 excel 上传到 pandas 数据框中?

转载 作者:行者123 更新时间:2023-11-28 22:22:48 26 4
gpt4 key购买 nike

我花了几个小时试图找到解决方案,但到目前为止一无所获。我有下表(见截图)。任何人都可以解释一下并解释如何将它上传到数据框中吗?非常感谢,安德里亚

enter image description here

enter image description here

最佳答案

试试这个:

pd.read_excel('data.xlsx', header=[0,1], index_col=[0,1,2,3])

关于python - 如何将 4 个多索引级别的行层次结构从 excel 上传到 pandas 数据框中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47444631/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com