반응형
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 |
Tags
- c#
- dataframe
- PostgreSQL
- gas
- Tkinter
- Redshift
- 파이썬
- string
- math
- google apps script
- Mac
- Google Excel
- PySpark
- numpy
- Google Spreadsheet
- GIT
- Apache
- Python
- Kotlin
- array
- PANDAS
- matplotlib
- Excel
- hive
- django
- list
- Github
- SQL
- Java
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