I have the below data :
grp_m1 grp_m2 grp_m3 grp_m4
$50-$75 $50-$75 $50-$75 $50-$75
$50-$75 $50-$75 $50-$75 $50-$75
$150-$175 $150-$175 $150-$175 $150-$175
$100-$125 $100-$125 $100-$125 $100-$125
$150-$175 $125-$150 $125-$150 $125-$150
These are then converted to dummies. The dtype of these dummies is unsigned int in the pandas
dataframe, and when I try to convert into this into an R dataframe by using the below code:
from rpy2.robjects import pandas2ri
pandas2ri.activate()
pandas2ri.py2ri(data)
I get the error below:
Error while trying to convert the column "grp_m4_$175-$200". Fall back to string conversion. The error is: Cannot convert numpy array of unsigned values -- R does not have unsigned integers.
(name, str(e)))
C:\Users\hduser\AppData\Local\Continuum\anaconda3.1\lib\site-packages\rpy2-2.9.1-py3.6-win-amd64.egg\rpy2\robjects\pandas2ri.py:61: UserWarning: Error while trying to convert the column "grp_m4_$200-$225". Fall back to string conversion. The error is: Cannot convert numpy array of unsigned values -- R does not have unsigned integers.
(name, str(e)))
Can this be fixed or do I need to remove those columns all together, e.g. just skip the column if this error is coming?
Can someone please help me with this?