반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- PySpark
- 파이썬
- PostgreSQL
- Mac
- GIT
- SQL
- Tkinter
- google apps script
- list
- matplotlib
- Github
- Kotlin
- Java
- Google Excel
- hive
- Apache
- numpy
- c#
- Google Spreadsheet
- PANDAS
- array
- Python
- django
- Redshift
- gas
- string
- math
- Excel
- dataframe
Archives
- Today
- Total
목록python tqdm (1)
달나라 노트

tqdm library를 이용하면 반복문 등 task의 진행 상황을 terminal에 progress bar 형태로 표시할 수 있습니다. from tqdm import tqdm from time import sleep for i in tqdm(range(100)): sleep(1) 위처럼 100번 loop를 도는 반복문을 넣습니다. 그리고 range(100)을 tqdm으로 감싸주기만하면 끝입니다. 그러면 위 이미지처럼 반복문이 실행될 때 마다 0%부터 100%까지 점점 올라가게됩니다. 반복문을 돌리는 횟수가 증가할수록 진행 상황 비율이 점점 자동으로 늘어나는 것이죠. time.sleep(s)는 s초 만큼 정지하라는 의미입니다. from tqdm import tqdm from time import slee..
Python/Python ETC
2021. 6. 4. 21:55