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
- tensorflow
- Unity
- node.js
- urllib
- 라즈베리파이
- MySQL
- Excel
- IOS
- ubuntu
- flutter
- PER
- pandas
- 맛집
- 리눅스
- swift
- ASP
- PyQt5
- MS-SQL
- 다이어트
- javascript
- GIT
- python
- 날짜
- 유니티
- sqlite
- PyQt
- Linux
- mssql
- port
- 함수
Archives
목록2025/03/17 (1)
아미(아름다운미소)
pandas의 str.split(expand=True)를 사용한 방법
import pandas as pdimport numpy as npimport time# 1. 예제 데이터 생성 (400만 건, '_' 없는 값 포함)data = {'a': ['foo_bar'] * 2_000_000 + ['hello_world'] * 1_500_000 + ['example'] * 500_000 + ['justtext'] * 500_000}df1 = pd.DataFrame(data) # Pandas용df2 = df1.copy() # NumPy용### 2. Pandas str.split(expand=True) 방식 ###start_time = time.time()debris = df1['a'].str.split('_', expand=True)df1['aaa'] = debris[0]df1..
랭귀지/pandas
2025. 3. 17. 18:18