关于#python#的问题:提问pythondebug提示'DataFrame' object has no attribute 'to_panel'

提问python
debug提示'DataFrame' object has no attribute 'to_panel',要怎么处理啊

应该调用方式有问题,DataFrame.to_panel()是一个方法,调用时候必须加括号,例如:

df.to_panel()

说明DataFrame对象中没有一个叫做to_panel的属性或方法。可以检查一下变量的命名,看看是否有命名错误。