我需要一个不使用toList的reverseT的替代品。显然,这段代码是不正确的,但它演示了我所追求的想法: :: (Foldable f, Representable f, Num (Rep f))reverseFf = tabulate $ \ix -> index f $ last - ix
where last = length f - 1 -- Incorrect; length
当我尝试使用pandas数据框的.ix属性来拉出列时,例如df.ix[:, 'col_header'],我得到了这个错误。AttributeError: 'DataFrame' object has no attribute 'ix'
今天上午脚本运行正常,但今天下午我在一个全新安装了Pandas的新Linux环境中运行了它
当我用.ix和DataFrame一起使用时,有没有办法强迫熊猫总是返回DataFrame?例如,如果我运行以下行,import numpy as np
x = df.ix[0]那么x将是一个DataFrame,因为0在索引中出现了两次,y将是一个级数,因为1在索引中是唯一的。我也希望y是一个DataFrame