You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current code links to github's wage data which is only an RData dataset, then the code reads:
Data Analysis
Set the following file_directory to a place where you downloaded https://github.com/CausalAIBook/MetricsMLNotebooks/blob/main/PM1/wage2015_subsample_inference.rdata
file_dir = None
df = pd.read_csv(file_dir)
I found two solutions:
Import RData to Pandas ready package (taken from my collab code):
!pip install pyreadr
import pyreadr
import numpy as np
import pandas as pd
temp = pyreadr.read_r('/content/wage2015_subsample_inference.Rdata')
df = temp['data']
Upload a CSV
The text was updated successfully, but these errors were encountered:
Eli-m93
changed the title
PM-1 Jupyter Book Cannot Load .RData
PM1_prediction.ipynb Jupyter Book Cannot Load .RData
Feb 8, 2022
having similar problems, where is the CSV located?
Hi Togeka, you can copy and paste this code into google collab to read RData into your jupyter notebook:
!pip install pyreadr
import pyreadr
import numpy as np
import pandas as pd
temp = pyreadr.read_r('/content/wage2015_subsample_inference.Rdata')
df = temp['data']
On google collab you need to literally click the folder icon on the right hand side, and manually upload the RData file onto the collab website to use it.
The current code links to github's wage data which is only an RData dataset, then the code reads:
I found two solutions:
The text was updated successfully, but these errors were encountered: