如何删除python pandas.DataFrame 的多重index

2024-12-17 18:41:52
推荐回答(1个)
回答1:

命名元组:
>>> platform.uname()
uname_result(system='Linux', node='fedora.echorand',
release='3.7.4-204.fc18.x86_64', version='#1 SMP Wed Jan 23 16:44:29
UTC 2013', machine='x86_64', processor='x86_64')

top1000[:10]  

top1000.index = top1000.index.droplevel()  

top1000.index = top1000.index.droplevel()  

top1000[:10]