Hi there,
What fun playing with R and Python!
Check out this link:
https://stackoverflow.com/questions/58472090/loading-pickle-in-r
First save the following Python code into a file called "read_pickle.py" in the current directory:
import pandas as pd
def read_pickle_file(file):
pickle_data = pd.read_pickle(file)
return pickle_data
Check your pickle file is in the same directory.
Then run this R code to read your pickle file and return it in an R object:
# install.packages('reticulate')
library("reticulate")
py_install("pandas")
# On Windows 10 I was asked to install conda (package manager), which I did.
py_install("pickle") # Not sure this line is needed - pickle may be built-in
source_python("read_pickle.py")
pickle_data <- read_pickle_file("your_file.pickle")
pickle_data
HTH