반응형
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 |
Tags
- django
- Google Spreadsheet
- Google Excel
- SQL
- string
- Redshift
- PySpark
- GIT
- hive
- matplotlib
- Apache
- Kotlin
- c#
- 파이썬
- Mac
- Github
- gas
- array
- list
- numpy
- Tkinter
- google apps script
- PANDAS
- Python
- PostgreSQL
- dataframe
- math
- Excel
- Java
Archives
- Today
- Total
목록올림 (1)
달나라 노트
Python math : ceil, floor, round (올림, 내림, 반올림)
먼저 python의 기본 반올림 함수로 round 가 있습니다. round(number, digit) number --> 반올림을 적용할 숫자입니다. digit --> 반올림 하여 얻은 결과에 소수점이 몇개나 있을지에 대한 숫자입니다. 이것의 의미는 아래 예시에서 보겠습니다. print(round(1738.7926)) # 1 --> 1739 print(round(1738.7926, 0)) # 2 --> 1739.0 print(round(1738.7926, 1)) # 3 --> 1739.8 print(round(1738.7926, 2)) # 4 --> 1739.79 print(round(1738.7926, 3)) # 5 --> 1739.793 print(round(1738.7926, -1)) # 6 -->..
Python/Python math
2021. 9. 6. 23:46