I am trying to load a pickle object in R, using the following process found online.
First, I create a Python file called: "pickle_reader.py":
import pandas as pd
def read_pickle_file(file):
pickle_data = pd.read_pickle(file)
return pickle_data
Then, I run the following R code:
install.packages('reticulate')
require("reticulate")
source_python("pickle_reader.py")
pickle_data <- read_pickle_file("pathname")
but I get an error that says:
Error in py_run_file_impl(file, local, convert) :
ImportError: No module named pandas
N.B. I tried installing pandas again but this doesn't change the issue.
Do you know how should I proceed?
Thank you in advance