I get an error when I try to import rpy2. Here is the code and error.
>>> import pandas.rpy.common Traceback (most recent call last): File \"C:\\PF\
Well, first you have to install rpy2. If you are using conda you can do it using the following command
conda install -c r rpy2
Then, if you want to use R on Jupyter Notebook environment you can activate R using
%load_ext rpy2.ipython