I am trying to load a .dat file as a dataframe using:
import pickle
import pandas as pd
file_to_read = open(load_path_SQTN_f+str(identifier[which_one])+"_with_SQTN_final.dat", "rb") # sto trito bale 2 opws einai twra
SQTN = pickle.load(file_to_read)
file_to_read.close()
I get the following error.
Can't get attribute '_unpickle_block' on <module 'pandas._libs.internals' from 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\pandas\\_libs\\internals.cp37-win_amd64.pyd'>
I tried updating pandas to the latest version with:
pip3 install --upgrade pandas --user
I have also tried loading the .pkl file using
SQTN = pd.read_pickle(load_path_SQTN_f+str(identifier[which_one])+"_with_SQTN_final.dat")
Which once again is giving me the same error.
Note that I can load other .dat files on the same anaconda env without a problem.
Could it be because the underlying pickle for pandas is not compatible with the pickle I used to dump? If so how could I fix the issue?