일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- synology
- keras
- javascript
- Button
- E-P1
- 알고리즘
- GitHub
- RNN
- Series
- Lotto
- install
- ipad
- DFS
- dataframe
- pycharm
- LSTM
- Numpy
- SPL
- imread
- mean
- Python
- CNN
- index
- pandas
- 삼성소프트웨어멤버십
- Splunk
- mariadb
- pip
- GT-S80
- SciPy
Archives
- Today
- Total
목록Class (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