Closed soheila-sahami closed 2 years ago
It turns out that it is kinda trivial to add. Check #18 and tell me if you can open your files with it.
Thanks for the update.
I could open the file and parse it, but the convert method throws an error in line 140:
AttributeError: 'RData' object has no attribute 'attributes'
RData object is created in line 544 using the 'data' parameter which is not an instance of RData.
It is the same if I set the default_encoding or not.
My test code is as follows:
import rdata
parsed = rdata.parser.parse_file(file_path)
converted = rdata.conversion.convert(parsed, default_encoding="utf8")
converted_df = pd.DataFrame(converted.get("df_final"))
Sorry, but I can't replicate the error. Do you have some example RDS file that I can check?
I have tried it with the test data that I shared with you, and got the same error. Could you please try it?
I can't reproduce the error. For me it seems to work:
You said that the error is in the conversion step. Can you print the parsed structure?
Were you able to parse it, @soheila-sahami ?
Hi, Thanks for the update. I tried it after the latest changes you did and it works as expected. convert method returns a df and no need to call converted.get("df_final"), as was explained in a comment. Mega thanks!
Closed by #18.
Is it possible to improve the package in a way that it can read rds data too? Thanks in advance!