Notice
Recent Posts
Recent Comments
Link
유자차의 재테크 공부방
[Python] Pandas에 apply 진행률 보기 본문
반응형
tqdm의 tqdm.pandas를 사용하면 progress_apply통해 dataframe에 apply가 얼마나 진행되었는지 볼 수 있다.
df가 좌측과 같다고 할 때
일반적으로 apply를 사용할 때,
df = df.apply(func, axis=1)
print(df)
progress_apply를 통해 진행률을 볼 때
from tqdm import tqdm
tqdm.pandas()
df = df.progress_apply(func, axis=1) # df.progress_apply(적용할 것, 적용방향)
print(df)
반응형
'파이썬 > 기본 문법' 카테고리의 다른 글
for문에서 2가지 변수 가져오기 (0) | 2023.02.12 |
---|---|
[Python] Garbage Collecting (0) | 2022.06.13 |
[Python] 이중 정렬하기 (0) | 2022.05.07 |
math라이브러리 없이 올림하기 (0) | 2022.04.25 |
이중 정렬 (0) | 2022.03.25 |
Comments