The data is cut out when using pandas2ri to transfer it

Issue #414 new
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

pd2r.activate()

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

Comments (0)

  1. Log in to comment