반응형
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
- string
- Python
- hive
- Tkinter
- PySpark
- array
- dataframe
- GIT
- 파이썬
- Redshift
- Mac
- numpy
- gas
- Java
- Github
- list
- PostgreSQL
- django
- Apache
- Excel
- SQL
- google apps script
- PANDAS
- Google Excel
- Google Spreadsheet
- matplotlib
- Kotlin
- c#
- math
Archives
- Today
- Total
목록IsNumeric (1)
달나라 노트
Python Basic : isnumeric (숫자로 변환될 수 있는 data인지 체크하기)
Python에 있는 isnumeric() method는 String type의 데이터에 적용할 수 있으며, 해당 String data가 숫자로 전환될 수 있는 data라면 True, 숫자로 전환될 수 없는 data라면 False를 반환합니다. text1 = '1' print(text1.isnumeric()) text2 = '1a' print(text2.isnumeric()) text2 = 'Text Text' print(text2.isnumeric()) -- Result True False False 위 예시를 봅시다. text1 -> 비록 따옴표로 1이라는 문자가 String으로서 되어있지만, 1은 숫자로 전환될 수 있겠죠? 따라서 isnumeric은 True를 반환합니다. text2 -> 1a는 St..
Python/Python Basic
2021. 3. 18. 20:00