반응형
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
- hive
- Kotlin
- Excel
- PySpark
- Google Spreadsheet
- django
- array
- math
- numpy
- Redshift
- Tkinter
- SQL
- list
- matplotlib
- Python
- PostgreSQL
- 파이썬
- Apache
- PANDAS
- dataframe
- Google Excel
- GIT
- Mac
- string
- gas
- Github
- google apps script
- c#
- Java
Archives
- Today
- Total
목록to_numpy (1)
달나라 노트
Python Pandas : Series .values vs .to_numpy()
Pandas Series .values vs .to_numpy() 둘 다 Series를 numpy array로 변환하지만, .values는 dtype에 따라 동작이 달라지고 원본을 건드릴 위험이 있습니다. .to_numpy()가 현재 권장 방식입니다. 기본 사용 결과는 같아 보입니다. 차이는 dtype이 복잡해질 때 드러납니다. import pandas as pds = pd.Series([10, 20, 30])s.values # array([10, 20, 30])s.to_numpy() # array([10, 20, 30]) 차이 1 — 반환 타입이 dtype에 따라 달라진다 .values는 Series 내부 저장 방식에 따라 반환 타입이 달라집니다. # 일반 dtype → nu..
Python/Python Pandas
2026. 5. 14. 19:25
