반응형
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 |
Tags
- Excel
- numpy
- Google Spreadsheet
- array
- GIT
- matplotlib
- Github
- django
- c#
- math
- Apache
- gas
- Kotlin
- 파이썬
- PySpark
- Tkinter
- PostgreSQL
- Google Excel
- PANDAS
- Python
- google apps script
- Mac
- list
- SQL
- Java
- Redshift
- dataframe
- string
- hive
Archives
- Today
- Total
목록ndarr (1)
달나라 노트
Python numpy : shape, size (array의 모양과 크기 출력하기)
import numpy as np arr_test = np.array( [ # 1차 array [1, 2, 3, 4, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5] # 2차 array ] ) print(arr_test) print(arr_test.size) print(arr_test.shape) -- Result [[1 2 3 4 5] [1 2 3 4 5] [1 2 3 4 5]] 15 (3, 5) 위 예시를 봅시다. 2차원 array를 만들고 size와 shape attribute를 적용시켰습니다. size attribute는 array에 존재하는 모든 요소의 개수를 알려줍니다. 위 예시의 array는 5개의 요소를 가진 array가 총 3개 들어있는 2차원 array입니다. 이것을 ..
Python/Python numpy
2021. 12. 26. 21:25