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
- 리눅스
- mssql
- 다이어트
- 맛집
- PyQt5
- 날짜
- sqlite
- Excel
- tensorflow
- port
- Unity
- swift
- ubuntu
- javascript
- Linux
- 라즈베리파이
- 유니티
- urllib
- MS-SQL
- python
- flutter
- ASP
- pandas
- MySQL
- PER
- GIT
- 함수
- PyQt
- node.js
- IOS
Archives
목록2025/06/09 (1)
아미(아름다운미소)
Type 변경
cols = ['col1', 'col2', 'col3'] # category로 바꿀 컬럼 리스트df[cols] = df[cols].apply(lambda x: x.astype('category'))import pandas as pdimport numpy as np# 예시 데이터 생성df = pd.DataFrame({ 'col1': np.random.choice(['apple', 'banana', 'cherry'], 1_000_000), 'col2': np.random.choice(['red', 'green', 'blue'], 1_000_000), 'col3': np.random.choice(['small', 'medium', 'large'], 1_000_000)})# 🔍 메모리 사용량..
랭귀지/pandas
2025. 6. 9. 14:52