반응형
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
- GIT
- Google Excel
- Google Spreadsheet
- SQL
- Apache
- dataframe
- math
- gas
- 파이썬
- Java
- Mac
- PySpark
- hive
- Redshift
- string
- Kotlin
- PANDAS
- google apps script
- PostgreSQL
- numpy
- Tkinter
- Github
- list
- c#
- django
- array
- Python
- matplotlib
- Excel
Archives
- Today
- Total
목록dir (1)
달나라 노트
Python Basic : dir (class의 method, attribute 확인하기, class method, attribute 리스트 확인)
Python을 사용하다 보면 다양한 class를 사용하게 됩니다. 외부에서 library를 import 해올 때, 내가 직접 만든 class를 사용할 때 정말 많은 경우에 class를 사용하게 됩니다. 근데 내가 class를 직접 구성한다고 해도 그 내용을 영원히 기억하고 있을 수는 없으며, 하물며 외부 module을 import할 때 어떤 class에 어떤 attribute와 method가 정의되어있는지 다 알기는 어렵습니다. 관련 library의 document를 찾아보는 것도 좋은 방법이지만 구글링을 해서 원하는 정보를 찾아내는데 시간은 걸리죠. 이때 사용할 꽤 유용한 방법이 있습니다. 바로 dir method입니다. Syntax dir(param) dir() method는 parameter로 받은..
Python/Python Basic
2024. 2. 27. 21:45
