본문 바로가기

언어 꿀Tip/Python 꿀tip!

07_01_11. pickle 형태로 내보내기 / 불러오기

import pickle
import pickle5 as pickle
#Save
with open( 'hi.pickle' , 'wb' ) as handle:
     pickle.dump( df, handle, protocol = pickle.HIGHEST_PROTOCOL )
     
     
 #Load    
with open( 'hi.pickle' , 'rb' ) as handle:
     hi = pickle.load(handle)