메모리 문제 시 해결 방법
ㅇ 타입을 한 단계 더 낮춰줌 #램이 터진다면 모델링 전에 사용해보자 - 할당된 메모리를 줄여 숫자 연산시에 overflow 생기기때문에 모델링 직전에만 사용할 것 def reduce_mem_usage(df, verbose=True): numerics = ['int16', 'int32', 'int64', 'float16', 'float32', 'float64'] start_mem = df.memory_usage().sum() / 1024**2 for col in df.columns: col_type = df[col].dtypes if col_type in numerics: c_min = df[col].min() c_max = df[col].max() if str(col_type)[:3] == 'int':..
2021.06.01