我收到此错误:TypeError:object()不接受任何参数 [英] i"m getting this error: TypeError: object() takes no parameters
本文介绍了我收到此错误:TypeError:object()不接受任何参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我收到此错误:
TypeError:object()不带参数
TypeError: object() takes no parameters
我的代码:
import numpy as np
import pandas as pd
data = np.random.rand(2, 4, 5)
p = pd.Panel(data)
我希望输出:
<class 'pandas.core.panel.Panel'>
Dimensions: 2 (items) x 4 (major_axis) x 5 (minor_axis)
Items axis: 0 to 1
Major_axis axis: 0 to 3
Minor_axis axis: 0 to 4
推荐答案
If you are using a recent version of pandas, you will find that Panel has been removed.
在0.25.0中移除面板.有关以前的文档,请参阅0.24文档
Panel was removed in 0.25.0. For prior documentation, see the 0.24 documentation
此 Stack Overflow帖子解释了建议替代.
这篇关于我收到此错误:TypeError:object()不接受任何参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文