UnpicklingError when i read all the data files which is in a dataframe

Viewed 13
path = pd.DataFrame(glob("D:\\opt_1234\\*"), columns=['location'])
path
path['datadate']=path['location'].apply(lambda x: x.split('_')[-1].split('.')[0])
path['datadate']=path['datadate'].apply(lambda x: datetime.strptime(x,'%d%m%Y'))
path=path.sort_values('datadate')
path.reset_index(drop=True,inplace=True)



for i,j in path.iterrows():
   data=pd.read_pickle(j["location"])

"""when i do this ,am gettin an error of _pickle.UnpicklingError: pickle data was truncated to readl all the csv files which is in a dataframe is there any othe rpossible ways?"""

0 Answers
Related