Python 类型错误:';列表';对象无法调用以进行多重索引
我想得到多索引数据帧。 在工作中,我遇到错误“TypeError:“list”对象不可调用” 这是我的情况 请回答我帮忙Python 类型错误:';列表';对象无法调用以进行多重索引,python,list,pandas,dataframe,zip,Python,List,Pandas,Dataframe,Zip,我想得到多索引数据帧。 在工作中,我遇到错误“TypeError:“list”对象不可调用” 这是我的情况 请回答我帮忙 谢谢您以前可能在代码中使用了list作为变量。 下面是一个示例代码 a = list() a.append(2) print(a) list = 1 print(type(list)) #Here you would see that the type of list is integer #To get back the type list,just delete th
谢谢您以前可能在代码中使用了list作为变量。 下面是一个示例代码
a = list()
a.append(2)
print(a)
list = 1
print(type(list))
#Here you would see that the type of list is integer
#To get back the type list,just delete the reference as below
del list
print(type(list))
#Now it will print that its of type list
在当前代码中,您以前是否使用列表作为变量名?请参阅如何提供一个变量名。我们正在以文本的形式查找您的一些输入数据,以及您尝试的代码和收到的错误,所有这些都是文本。不是图像,也不是指向图像的链接。谢谢@卡扬:你绝对是对的。我使用列表作为变量名,所以它不起作用!非常感谢你@coldspeed这是我第一次在stack over flow中编写。对不起that@eunchongshin,我已经写了一个带更多解释的答案,请查看