Skip to content

Usage of - df1 = result["df1"] # extract the pandas data frame for object df1 #81

Answered by ofajardo
BNSBNS asked this question in Q&A
Discussion options

You must be logged in to vote

The issue has been converted to a discussion, as I don't think there is any issue with the package, and you are just requesting information.

The way to deal with this is descrived in the README of the repo (please read it). Basically, pyreadr will give you back a python dictionary, you can print what keys you have in that dictionary so that you can retrieve the dataframes. If you are not familiar with dictionaries, please read a bit about them, they are very important. Most likely there is no object df1 among your keys.

Again, from the README:

import pyreadr

result = pyreadr.read_r('test_data/basic/two.RData')
print(result.keys()) # let's check what objects we got # YOU HAVE TO DO THIS! …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@BNSBNS
Comment options

Answer selected by BNSBNS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #80 on June 07, 2022 05:07.