반응형
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 | 31 |
Tags
- google apps script
- array
- string
- dataframe
- Java
- django
- Redshift
- Google Excel
- math
- numpy
- Tkinter
- Mac
- hive
- Kotlin
- PANDAS
- c#
- PostgreSQL
- 파이썬
- Github
- Apache
- Python
- list
- matplotlib
- Google Spreadsheet
- gas
- SQL
- Excel
- GIT
- PySpark
Archives
- Today
- Total
목록np.copy (1)
달나라 노트
Python numpy : copy (array 복사본 생성하기)
import numpy as np arr_test = np.array([1, 2, 3, 4, 5]) arr_test_2 = arr_test arr_test_2[1] = 10 print(arr_test) print(arr_test_2) 위 예시를 봅시다. arr_test에 [1, 2, 3, 4, 5]를 array로 만들어서 할당했습니다. 그리고 arr_test_2 변수에 arr_test를 그대로 할당하교있죠. 이 시점에서 arr_test == arr_test_2일 것입니다. arr_test_2[1] = 10 그리고 arr_test_2의 index = 1 값을 10으로 바꿨죠. 그러면 당연히 arr_test_2는 아래와 같이 바뀔겁니다. [ 1 10 3 4 5] 그러면 이때 arr_test는 [1 2 3 4..
Python/Python numpy
2021. 12. 29. 00:52