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
- vscode
- yaml
- scikit-learn
- json schema
- Ollama
- Docker Compose
- pandas
- RandomAccessFile
- vim
- CSS
- FileChannel
- json
- Webpack
- PowerShell
- curl
- Python
- cli
- Vite
- docker
- 열선택
- UV
- Typescript
- podman
- 정렬
- Java
- drop_first
- tauri
- 이미지
- io
- scaler
Archives
- Today
- Total
목록Mode (1)
워로디스
Pandas. 최빈값
Pandas에서 최빈값(mode) 은 .mode()으로 구합니다.import pandas as pds = pd.Series([1, 2, 2, 3, 3, 3, 4])s.mode()결과:0 3dtype: int64값만 하나 꺼내려면:s.mode()[0]DataFrame 컬럼에서 구하기df["col"].mode()df["col"].mode()[0]단, 최빈값이 여러 개일 수 있기 때문에 .mode()는 항상 Series 형태로 반환합니다.예:s = pd.Series([1, 1, 2, 2, 3])s.mode()결과:0 11 2dtype: int64빈도수 자체도 확인하려면:df["col"].value_counts()가장 빈도가 높은 값 하나만 필요하다면:df["col"].value_counts()..
Data Science/Pandas
2026. 9. 23. 22:11