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
- MySQL
- 날짜
- ubuntu
- ASP
- pandas
- PER
- Excel
- IOS
- javascript
- PyQt5
- 유니티
- Linux
- GIT
- python
- swift
- 함수
- urllib
- port
- PyQt
- sqlite
- tensorflow
- 맛집
- 다이어트
- MS-SQL
- 리눅스
- node.js
- Unity
- mssql
- 라즈베리파이
- flutter
Archives
아미(아름다운미소)
join 본문
import pandas as pd
df1 = pd.DataFrame({'A': [1, 2], 'B': [3, 4]}, index=['x', 'y'])
df2 = pd.DataFrame({'A': [5, 6], 'C': [7, 8]}, index=['x', 'y'])
# Left join with drop=False
result = df1.join(df2.set_index('A', drop=False),
how='left', # 명시적으로 left join 지정
lsuffix='_left',
rsuffix='_right')
print(result)
'랭귀지 > pandas' 카테고리의 다른 글
merge (0) | 2025.05.28 |
---|---|
object 타입 컬럼을 모두 문자열(str)로 변환 (0) | 2025.05.26 |
df count (0) | 2025.05.15 |
parquet (0) | 2025.04.23 |
두 데이터프레임 df와 df2에서 'a'와 'b' 컬럼을 비교하여 매핑이 다른 행을 찾는 예제 (0) | 2025.04.14 |
Comments