【问题标题】:TypeError: 'list' object is not callable to do multi- indexingTypeError:“列表”对象不可调用以进行多索引
【发布时间】:2018-10-29 06:30:17
【问题描述】:

我想获取多索引数据框。 在工作中,我收到错误“TypeError:'list' object is not callable”

这是我的情况

enter image description here

请回答我以提供帮助

谢谢

【问题讨论】:

  • 你之前在当前代码中是否使用过list作为变量名?
  • 请查看如何提供minimal reproducible example。我们正在以 text 形式查找您的一些输入数据,以及您尝试的代码和您收到的错误,all 作为文本。不是图片,也不是图片链接。谢谢!
  • @Kalyan 你绝对是对的。我使用 list 作为变量名,所以它不起作用!非常感谢!
  • @coldspeed 这是我第一次在堆栈溢出中写作。对此感到抱歉
  • @eunchongshin,我已经写了一个带有更多解释的答案,请查看

标签: python list pandas dataframe zip


【解决方案1】:

您之前可能在代码中使用过列表作为变量。 这是一个示例代码

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

【讨论】:

    猜你喜欢
    • 2019-01-05
    • 2012-06-14
    • 2021-06-16
    • 1970-01-01
    • 2017-10-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多