我有一个数据面板,我想切片数据来绘制它。
例如。次要维度上的切片。数据是
<class 'pandas.core.panel.Panel'>
Dimensions: 71 (items) x 192 (major) x 19 (minor)
Items: gain to gain_delta
Major axis: AFG to ZWE
Minor axis: ISO3 to 2011
所以如果我想绘制这个切片:
scores.ix[['gain'],['ESP'],2:21]
给
<bound method Panel.to_frame of <class 'pandas.core.panel.Panel'>
Dimensions: 1 (items) x 1 (major) x 17 (minor)
Items: gain to gain
Major axis: ESP to ESP
Minor axis: 1995 to 2011>
但这些都给出错误:
scores.ix[['gain'],['ESP'],2:21].plot()
scores.ix[['gain'],['ESP'],2:21].to_frame.plot()
a=scores.ix[['gain'],['ESP'],2:21]
plot(a)
谢谢!