我正在尝试使用以下面板进行一些pd.Panel
操作:
print(panell)
print(panell.shape)
给出:
<class 'pandas.core.panel.Panel'>
Dimensions: 9 (items) x 60 (major_axis) x 114 (minor_axis)
Items axis: 31.5hz to 8000hz
Major_axis axis: 2018-10-22 07:00:00 to 2018-10-24 18:00:00
Minor_axis axis: (1, 1) to (38, 3)
(9, 60, 114)
然后我想在minor_axis
上循环,但它找不到正确的标签。例如,两者:
print(panell.loc[:,:,'(38, 3)'])
print(panell[:,:,'(38, 3)'])
给出:
KeyError: 'the label [(38, 3)] is not in the [minor_axis]'
有什么建议吗
您需要在列表中按元组选择:
因为:
相关问题 更多 >
编程相关推荐