I made a pickle file of a dataframe from my computer using pd.to_pickle()
which I could not read in colab. It gives error ValueError: unsupported pickle protocol: 5
. Please give a solution.
CodePudding user response:
You need to install pickle5
first, using:
!pip install pickle5
Then,
#Import the library
import pickle5 as pickle
path = 'path_to_pickle5'
with open(path, "rb") as dt:
df = pickle.load(dt)