Python 从Rpy2到pandas再到pandas的数据帧类

Python 从Rpy2到pandas再到pandas的数据帧类,python,r,pandas,rpy2,Python,R,Pandas,Rpy2,我在rpy2中有一个daframe,它输出以下类: In [58]: [tuple(x.rclass) for x in df_rpy2] Out[58]: [('integer',), ('integer',), ('numeric',), ('numeric',)] 现在如果我这样做: from rpy2.robjects import pandas2ri as pd2ri tmp = pd2ri.ri2py(df_rpy2) df_from_pd = pd2ri.py2ri(tmp)

我在
rpy2
中有一个daframe,它输出以下类:

In [58]: [tuple(x.rclass) for x in df_rpy2]
Out[58]: [('integer',), ('integer',), ('numeric',), ('numeric',)]
现在如果我这样做:

from rpy2.robjects import pandas2ri as pd2ri

tmp = pd2ri.ri2py(df_rpy2)
df_from_pd = pd2ri.py2ri(tmp)
print([tuple(x.rclass) for x in df_from_pd])
我得到
[('array',),('array',),('array',),('array',),('array',)]

怎么还能有最初的课程呢