Notice
Recent Posts
Recent Comments
Link
아미(아름다운미소)
pandas 병렬처리 본문
import multiprocessing as mp
def square_parallel(x):
return x ** 2
# 병렬 처리 사용
start = time.time()
with mp.Pool(processes=4) as pool:
df['A_squared'] = pool.map(square_parallel, df['A'])
print(f"병렬 처리 소요 시간: {time.time() - start:.2f} 초")
'랭귀지 > pandas' 카테고리의 다른 글
컬럼명을 닥셔너리에 저장 후 불러쓰기 (0) | 2024.07.01 |
---|---|
데이터프레임의 컬럼 타입을 지정된 타입으로 변경 (0) | 2024.06.28 |
타입지정 (0) | 2024.06.26 |
pandas 날짜차이 분으로 환산 (0) | 2024.06.24 |
fastapi mysql crud & javascript & flutter 예제 (0) | 2024.06.22 |
Comments