반응형
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
- list
- Google Spreadsheet
- Google Excel
- Mac
- PostgreSQL
- 파이썬
- array
- numpy
- Java
- gas
- Redshift
- SQL
- Excel
- django
- PySpark
- Python
- dataframe
- google apps script
- math
- GIT
- hive
- PANDAS
- c#
- Apache
- string
- Github
- Tkinter
- matplotlib
- Kotlin
Archives
- Today
- Total
목록차원 (1)
달나라 노트
Python numpy : ndim (array의 차원(dimention) 출력하기)
numpy의 ndim attribute는 어떤 array가 몇차원인지를 알려줍니다. 아래는 ndim attribute를 사용한 예시입니다. import numpy as np arr_test = np.array( [1, 2, 3, 4, 5] # 1차 array ) print(arr_test) print(arr_test.ndim) -- Result [1 2 3 4 5] 1 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.ndim) -- Result [[1 2 3 4 5] [1 2 3 4 5] ..
Python/Python numpy
2021. 12. 26. 21:45