迭代面板短轴中所有项目(数据框)的首选方法是什么?
目前我正在使用
pnl = pd.Panel( ... )
for key, df in pnl.transpose(2,1,0).iteritems():
print( key )
但它看起来丑陋且不符合 Python 标准。
最佳答案
In [27]: for key in pnl.minor_axis :
....: print key
....: print pnl.minor_xs (key)
关于python - Pandas 面板 : How To Iterate Over the Minor Axis?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23557592/