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 current code links to github's wage data which is only an RData dataset, then the code reads:
I found two solutions: