| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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
- Numpy
- DFS
- Python
- Series
- mariadb
- dataframe
- pycharm
- install
- pandas
- ipad
- LSTM
- Lotto
- 알고리즘
- SciPy
- index
- E-P1
- javascript
- Button
- mean
- Splunk
- SPL
- imread
- GT-S80
- synology
- RNN
- pip
- GitHub
- 삼성소프트웨어멤버십
- keras
- CNN
Archives
- Today
- Total
목록tuple (1)
잠토의 잠망경
[python] namedtuple
기본 활용 클래스 같은 tuple형태이다. tuple은 한번 적용하면 변경 불가한 const 같은 것으로 가독성을 위하여 namedtuple을 사용하는 것이다. github code from collections import namedtuple CTest = namedtuple("CTest", "row col num num1") test01 = CTest(1,2,3,4) print('row: {0}, col: {1}, num: {2}, num1: {3}'.format(test01.row, test01.col, test01.num, test01.num1)) # tuple 이기때문에 변경은 안된다. test01.row = 10 print('row: {0}, col: {1}, num: {..
공부/Python
2020. 6. 14. 15:06