reading RDa file in python as a pandas data frame
I have an RDa file that I created in R. I want to read this file on python as a pandas dataframe. I have the following code to do the same: import rpy2.robjects as robjects import numpy as np from rpy2.robjects import pandas2ri pandas2ri.activate() # load your file robjects.r['load']('Data.RDa') matrix = robjects.r['data'] matrix I get the following results: R object with classes: ('data.frame',) mapped to: <DataFrame - Python:0x0CF46F58 / R:0x0ED0F200> [Float..., Float..., Float..., ..., Float..., Float..., Float...] area: <class 'rpy2.robjects.vectors.FloatVector'> R object with classes: ('n
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.