import pickle
# 저장할때 open("파일명", "wb") wb == 바이너리로 저장
# dump(변수명, f)
with open("list.pickle","wb") as f:
pickle.dump(flattened_list, f)
# 로드할때 open("경로명", "rb) rb == 리드 바이너리
with open("data/list.pickle", "rb") as f:
flattened_list = pickle.load(f)
'DataScience > Python' 카테고리의 다른 글
Streamlit 이미지 크기를 조절하기 (0) | 2022.12.22 |
---|---|
Pandas 행과 열의 문자열인덱스를 숫자로 가져오는 방법 (0) | 2022.12.16 |
Python gif 파일 만들기 (0) | 2022.12.12 |
Pandas url.csv 데이터분석 6.a실습 (0) | 2022.11.29 |
데이터프레임에 "특정단어"가 들어가있는지 여부 pd.str.contains() (0) | 2022.11.29 |