I am new to python and learning pandas. I want to convert a pandas data frame "datframe" to an R-style data frame (to use rpy2 later). To this end I have the following two lines in my code:
import pandas.rpy.common as com
r_dataframe = com.convert_to_r_dataframe(datframe)
The first command goes through but then I get the following error :
Traceback (most recent call last): File "", line 1, in r_dataframe = com.convert_to_r_dataframe(datframe) AttributeError: 'module' object has no attribute 'convert_to_r_dataframe' "
I am not sure why this is happening and how to troubleshoot it. Earlier in the code I have import pandas as pd Could this be the problem?
I am using python 2.7.3, rpy2-2.3.2 and 2.15.3