如果有人可以幫助我,我會非常感激。rpy2在ubuntu上得到「NotImplementedError:從rpy2 DataFrame轉換爲pandas'DataFrame」的測試
我在ubuntu 13.10上安裝了python 2.7,R 3.0.1,我已經按照rpy2安裝指南成功完成了測試。
使用此命令時python -m 'rpy2.tests'
我碰到下面的錯誤運行通過提示測試:
rpy2 version: 2.3.8
built against R version: 3-0.1--62743
............................................................................................ ............................................................................................ .........................................................................................................E...........................................................
======================================================================
ERROR: testPandas2ri
(rpy2.robjects.tests.testPandasConversions.PandasConversionsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/rpy2/robjects/tests/testPandasConversions.py", line 74, in testPandas2ri
pandas_df = robjects.conversion.ri2py(rdataf)
File "/usr/local/lib/python2.7/dist-packages/rpy2/robjects/pandas2ri.py", line 63, in ri2pandas
raise NotImplementedError("Conversion from rpy2 DataFrame to pandas' DataFrame")
NotImplementedError: Conversion from rpy2 DataFrame to pandas' DataFrame
----------------------------------------------------------------------
Ran 349 tests in 4.297s
我在Python解釋器安裝時,得到同樣的錯誤。我在哪裏可以找到這個轉換包裝?
rpy2-2.4.0-dev在編寫本文時相對穩定/健壯。不建議將該代碼複製到rpy2-2.3.x中,希望它能正常工作(並且可能不會讓你感覺很遠):爲了使轉換成爲可能,通用轉換系統部分重寫爲2.4.0。 – lgautier