1. rpy2
  2. rpy2
  3. rpy2
  4. Issues


Issue #414 new

The data is cut out when using pandas2ri to transfer it

Shankai Yan
created an issue

It happens when the data volume is large enough like (40000, 12). The shape is changed to (40000, 4) after transferring it to R. However, using numpy2ri is fine. Sample code is shown bellow.

import numpy as np
import pandas as pd
from rpy2.robjects import pandas2ri as pd2r


data = pd.DataFrame(np.random.randn(40000, 12), columns=list('ABCD'*3), dtype='float16')
rdf = pd2r.py2ri(data)
ro.r.assign('df', rdf)

Comments (0)

  1. Log in to comment