当Python代码在macosx上运行时,它可以正常工作。但是,当它在Windows上运行时,会抛出以下错误,其中fruits
是pandas.DataFrame
。在
编码
for i, row in fruits.T.iterkv():
data = json.loads(row.to_json())
错误:
AttributeError: 'Series' object has no attribute 'to_json'
是什么导致了这个错误?在
Windows系统运行的是python2.7.5和pandas v0.11.0。macosx运行的是2.7.2和pandas v0.12.0
API在v0.12.0中更改。在
根据What's new - v0.12.0 (July 24, 2013):
相关问题 更多 >
编程相关推荐